How often a term occurs across all of the documents.

lexical_frequency(corpus, word)

# S3 method for corpus
lexical_frequency(corpus, word)

Arguments

corpus

A corpus, as returned vy corpus.

word

Word to check frequency.

Examples

# 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")
# }