stable_transform: Generate the SRP encoding of a string

Description Usage Arguments Value Examples

Description

Generate the SRP encoding of a string

Usage

1
2
stable_transform(words, counts = NULL, standardize = T, log = T,
  length_out = 160)

Arguments

words

A string or vector of strings. If standardize is TRUE, this will be tokenized for you.

counts

The number of times each string occurs. If NULL (the default), each string is assumed to occur once.

standardize

Whether to perform standard tokenization.

log

Whether to use a log transform.

length_out

The desired dimensionality

Value

A vector giving the

Examples

1
2
3
#The two functions below return the same amount. The first takes longer to run but less time to write.
stable_transform("oh happy happy day", length_out = 10)
stable_transform(c("oh", "happy", "day"), counts = c(1, 2, 1), length_out = 10)

bmschmidt/SRP-R documentation built on May 7, 2019, 5 a.m.