as.dictionary.textmodel_wordmap: Create lexicon from a Wordmap model

View source: R/textmodel.R

as.dictionary.textmodel_wordmapR Documentation

Create lexicon from a Wordmap model

Description

as.list() returns features with the largest coefficients as a list of character vector. as.dictionary() returns a quanteda::dictionary object that can be use for dictionary analysis.

Usage

## S3 method for class 'textmodel_wordmap'
as.dictionary(x, separator = NULL, ...)

## S3 method for class 'textmodel_wordmap'
as.list(x, ...)

Arguments

x

a model fitted by textmodel_wordmap().

separator

the character in between multi-word dictionary values. If NULL, x$concatenator will be used.

...

passed to coef.textmodel_wordmap

Value

Returns a list or a quanteda::dictionary object.


wordmap documentation built on Oct. 21, 2024, 1:07 a.m.