semantics: semantics

Description Usage Arguments Value Examples

View source: R/semantics.R

Description

Fetch semantic vectors for words or documents

Usage

1
semantics(x, vectors)

Arguments

x

a vector of strings. The strings can either be single words or longer documents.

vectors

a matrix of word vectors, where each row is a word vector with the word labels stored as rownames

Value

a dataframe of word or document semantic vectors. Single words from x will have the semantic word vectors from the vectors argument. Longer phrases or documents will be compiled into a fixed length vector by computing the mean of all the vectors in the phrase or document.

Examples

1
##semantics(c("WALRUS", "Jerk", "paradise"), TASA)

cookm346/textfeats documentation built on April 24, 2020, 9:50 p.m.