ngram.print: Inverted bar graph of the most frequent n-grams found within...

Description Usage Arguments Details Value Examples

Description

This function identifies the top number(num) of user specified n-grams(ngram) and provides a visual of each.

Usage

1
ngram.print(data.td, ngram = 1, num = 15)

Arguments

data.td

A tidy dataset

ngram

A user defined integer representing the number of tokens to analyze, 'n'

num

A user definied number of most frequenct ngrams to plot in the bar graph

Details

This function identifies all of the user specified n-grams (n word co-occurrences in a sequence of text) in a corpus, sums the frequency of occurrence for each n-gram, and sorts the list in descending order. The function then provides an inverted bar chart identifying each n-gram and its frequency of occurrence down to a user specified lower-bound (freq).

Value

A bar graph of the most frequent ngram found within a corpus

Examples

1
ngram.print(Articles, 2, 20)

JSmith146/CoRpEx documentation built on May 17, 2019, 10:11 p.m.