extract_ngram: Extract n-grams from the input tweets data

Description Usage Arguments Value Examples

View source: R/extract_ngram.R

Description

Extract n-grams from the input tweets data

Usage

1
extract_ngram(tweets, n = 3)

Arguments

tweets

A vector of tweets

n

Length of n-grams to be created Default is 3. n-grams of length 3 will be created

Value

Vector of n-grams

Examples

1
2
3
4
tweets <- c(
   "Make", "America", "Great", "Again", "DonaldTrump"
)
extract_ngram(tweets, n=3)

UBC-MDS/textprepr documentation built on Feb. 5, 2022, 8:13 a.m.