Learn R Programming

topics (version 0.21.0)

topicsGrams: N-grams

Description

The function computes ngrams from a text

Usage

topicsGrams(data, n = 2, sep = " ", top_n = NULL, pmi_threshold = 0)

Value

A list containing tibble of the ngrams with the frequency and probability and a tibble containing the relative frequency of the ngrams for each user

Arguments

data

(tibble) The data

n

(integer) The length of ngram

sep

(string) The separator

top_n

(integer) The number of top ngrams to be displayed

pmi_threshold

(integer) The pmi threshold, if it shall not be used set to 0