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)

textmining documentation built on May 2, 2019, 6:47 a.m.