count_tokens: Token Counts

Description Usage Arguments Value Examples

View source: R/cleaning.R

Description

collects the total number of tokens (Ntokens), and the number of unique tokens (Utokens) in the collection of documents

Usage

1
count_tokens(doc_tokens)

Arguments

doc_tokens

the tokens in the document

Value

a named vector with total token count 'Ntokens' and unique token count 'Utokens'

Examples

1
2
doc_tokens <- tokenize_docs( c('First entry of the doc,', 'Second entry of the doc.') )
count_tokens(doc_tokens)

duncankmckinnon/ezRnlp documentation built on Aug. 6, 2020, 1:28 a.m.