ngram: Function to create ngram docs

Description Usage Arguments Value Examples

Description

Function to create ngram docs

Usage

1
ngram(x, k = 1)

Arguments

x

tmCorpus object

k

number of words in ngram

Value

returns tmParsed object of ngrams

Examples

1
2
3
4
corp <- tmCorpus(c("This is first document", "This is second"))
parsed_ngrams <- ngram(corp, k = 2)
tabled <- make_tabled(parsed_ngrams)
content(tabled)


Search within the textmining package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.