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

View source: R/as.textmodel.R

as.textmodel_lssR Documentation

Create a dummy textmodel_lss object from external objects

Description

Create a dummy textmodel_lss object from a numeric vector, dense matrix or an existing textmodel_lss object. Pre-trained word-embedding models could used to perform LSS through this function.

Usage

as.textmodel_lss(x, ...)

Arguments

x

an object from which a dummy textmodel_lss object is created.

...

arguments used to create 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

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


koheiw/LSS documentation built on March 9, 2024, 4:41 a.m.