sacks_of_bags_of_words: Function to convert all records into a bag of tokens

Description Usage Arguments Value Examples

View source: R/klsh.R

Description

Function to convert all records into a bag of tokens

Usage

1
sacks_of_bags_of_words(r.set, k, fieldwise = FALSE)

Arguments

r.set

Record set

k

Parameter k, which is the number of shingle, tokens, or grams to break the string into

fieldwise

Flag where the defalt setting to include the record as the entire string

Value

Computes the bag of tokens for a record set

Examples

1
2
3
data(RLdata500)
data.500 <- RLdata500[-c(2,4)]
sacks_of_bags_of_words(data.500[1:3,c(-2)],k=2)

klsh documentation built on Jan. 13, 2021, 8:05 p.m.