as.textmodel_lss: Create a dummy textmodel_lss object from external objects

Description Usage Arguments Details Value Examples

View source: R/as.textmodel.R

Description

Create a dummy textmodel_lss object from a numeric vector or matrix. Pre-trained word-embedding models could used to perform LSS.

Usage

1

Arguments

x

an external object to construct dummy a dummy textmodel_lss object.

...

arguments used to construct a dummy object. seeds must be given when x is a dense matrix.

Details

A named numeric vector and a dense matrix are set to beta and embedding respectively. A dense matrix should have column names for words.

Value

a dummy textmodel_lss object

Examples

1
2
v <- c("a" = 0.1, "z" = -0.2, "d" = 0.3, "h" = -0.05)
lss <- as.textmodel_lss(v)

LSX documentation built on April 19, 2021, 5:06 p.m.

Related to as.textmodel_lss in LSX...