count the occurrences of individual words in an essay - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Education : EssayTools : EssayTools/CountUseOfEachWord

EssayTools[CountUseOfEachWord] - count the occurrences of individual words in an essay

EssayTools[CountUseOfAllWords] - count the occurrences of a group of words in an essay

Calling Sequence

CountUseOfEachWord( essays, words )

CountUseOfAllWords( essays, words )




set, list, or array of strings



set, list, or array of strings



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.


This function is part of the EssayTools package, so it can be used in the short form SimilarityScore(..) only after executing the command with(EssayTools). However, it can always be accessed through the long form of the command by using EssayTools[SimilarityScore](..).





CountUseOfEachWorda a b b c c,a a a c,a,b,c



CountUseOfAllWordsa a b b c c,a a a c,a,b,c



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.:







See Also

EssayTools, StringTools

Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam