ngram: Function to create ngram docs

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)

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

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