TokenScore: Token Score

View source: R/tokens.R

TokenScoreR Documentation

Token Score

Description

Computes lexicon score for a set of tokens

Usage

TokenScore(tokens, lexicon, ids = unique(tokens$id))

Arguments

tokens

Token data.table containing document id and word.

lexicon

Lexicon as a data.table with word and score columns.

ids

List of all document ids.

Value

data.table resulting of merging tokens and lexicon by adding 0 to tokens not found in lexicon. Column id is set as key.


M3SOulu/TextFeatures documentation built on June 24, 2022, 4:56 p.m.