The self-information of a word that appears C(w) times in a corpus of N words is: In an ideal code, thus: the length of the word, C(w) its number of occurrences and N the total number of words in the text.
a word in a corpus of N words can be said to be informative if its length is much greater than its self-information in this text: again, words with the smallest values for the following function can be said to be informative.