Description Usage Arguments Details Value See Also Examples
View source: R/add_remove_ngrams.R
Builds (n+1)-grams from n-grams.
add_1grams(ngram, u, seq_length)
a single n-gram.
length of an origin sequence.
n-grams are built by pasting every possible unigram in the every possible free position. The total length of n-gram (n plus total distance between elements of the n-gram) is limited by the length of an origin sequence, because the n-gram cannot be longer than an origin sequence.
vector of n-grams (where
n is equal to the
n of the input plus one).
1 2 3
add_1grams("1_2.3.4_3.0", 1L:4, 8) add_1grams("a.a_1", c("a", "b", "c"), 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.