EssayTools
CountUseOfEachWord
count the occurrences of individual words in an essay
CountUseOfAllWords
count the occurrences of a group of words in an essay
Calling Sequence
Parameters
Description
Examples
CountUseOfEachWord( essays, words )
CountUseOfAllWords( essays, words )
essays
-
set, list, or array of strings
words
The CountUseOfEachWord command looks for occurrences of words in essays. The returned result will be a N x M array, where N is the number of essays, and M is the number of words. The count at Result[i,j] will be the number of occurrences of word j in essay i.
The CountUseOfAllWords command looks for occurrences of words in essays. The returned result will an array with N entries, where N matches the number of essays. The count at Result[i] will be the total number of occurrences of all the words found in the list specified by words.
Changes in capitalization are considered equal in the count. Changes of word form such as pluralization are not considered in the count.
These functions are part of the EssayTools package, so they can be used in the short form, for example, CountUseOfEachWord(..), only after executing the command with(EssayTools). However, they can always be accessed through the long form of the command names by using, for example, EssayTools[CountUseOfEachWord](..).
with⁡EssayTools
AppendToWordList,BinaryCosineCoefficient,BinaryDiceCoefficient,BinaryJaccardCoefficient,BuildScoreModel,CosineCoefficient,CountMisspellings,CountUseOfAllWords,CountUseOfEachWord,DetectPlagiarism,DiceCoefficient,GetWordList,GetWordTable,IsAdjective,IsAdverb,IsConjunction,IsDefiniteArticle,IsIndefiniteArticle,IsInterjection,IsIntransitiveVerb,IsNominative,IsNoun,IsNounPhrase,IsPlural,IsPreposition,IsPronoun,IsTransitiveVerb,IsUsuallyParticipleVerb,IsVerb,JaccardCoefficient,Lemma,Misspellings,PartOfSpeech,QuadraticWeightedKappa,Reduce,Score,SetWordList,SimilarityScore,SpellCorrectWord,WordUse
CountUseOfEachWord⁡a a b b c c,a a a c,a,b,c
222301
CountUseOfAllWords⁡a a b b c c,a a a c,a,b,c
32
Hemingway≔Nothing happened. The fish just moved away slowly and the old man could not raise him an inch. His line was strong and made for heavy fish and he held it against his hack until it was so taut that beads of water were jumping from it. Then it began to make a slow hissing sound in the water and he still held it, bracing himself against the thwart and leaning back against the pull. The boat began to move slowly off toward the north-west.:
CountUseOfEachWord⁡Hemingway,fish,the,old,brace
2710
CountUseOfEachWord⁡map⁡StringTools:-LowerCase,Hemingway,fish,the,old,brace
See Also
StringTools
Download Help Document