Description Usage Arguments Examples
Determine whether an ngram_document
(output of ngram_document
)
contains unigrams, bigrams or a higher-order representation.
1 2 3 4 5 6 7 8 9 10 | ngram_complexity(document)
## S3 method for class 'ngram_document'
ngram_complexity(document)
## S3 method for class 'ngram_documents'
ngram_complexity(document)
## S3 method for class 'JuliaObject'
ngram_complexity(document)
|
document |
A document as returned by the |
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
init_textanalysis()
# build document
unigram <- ngram_document("This is a document.", 1L)
bigram <- ngram_document("This is a document.", 2L)
# test complexity
identical(ngram_complexity(unigram), 1L)
identical(ngram_complexity(bigram), 2L)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.