lexical_frequency.Rd
How often a term occurs across all of the documents.
lexical_frequency(corpus, word) # S3 method for corpus lexical_frequency(corpus, word)
corpus | A corpus, as returned vy |
---|---|
word | Word to check frequency. |
# NOT RUN { init_textanalysis() # build documents doc1 <- string_document("First document.") doc2 <- string_document("Second document.") # build corpus corpus <- corpus(doc1, doc2) lexical_frequency(corpus, "document") # }