gives the frequency of word in text.


gives an association of the frequencies of each of the wordi.

Details and Options

  • WordFrequency[text,word] gives the number of occurrences of word divided by the total number of words in text.
  • In WordFrequency[text,word], word can be a multiword string containing spaces. For an n-gram string, the result is divided by the total number of n-grams in text.
  • WordFrequency[text,word1|word2|] gives the total frequency of all the wordi.
  • WordFrequency[{text1,text2,},word] gives a list of frequencies in each of the texti.
  • Possible options include:
  • IgnoreCaseFalsewhether to ignore letter casing
  • WordFrequency[text,word,"CaseVariants"] gives an association that includes frequencies of all variants of upper and lower case.


open allclose all

Basic Examples  (2)

Find the frequency of the word "the" in a string:

Click for copyable input

Find the frequencies for a list of words:

Click for copyable input

Scope  (7)

Options  (1)

Possible Issues  (1)

Neat Examples  (2)

See Also

WordCloud  WordFrequencyData  WordCounts  DictionaryWordQ  WordData

Introduced in 2016