score_documents: Score documents

Description Usage Arguments See Also Examples

View source: R/score_documents.R

Description

score_documents uses word scores to assign document scores

Usage

1
score_documents(scores, n_dimensions = 10)

Arguments

scores

A list from output of scale_text

n_dimensions

An integer scalar. How many dimensions of scaled text to score.

doc_length_correction

A numeric scalar. Power on document length: document_scores / document_length^(doc_length_correction). Set so that extremity on top dimensions is not strongly correlated with document length.

See Also

scale_text, read_word_embeddings, get_keywords, plot_keywords, doc_to_tdm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
scores <- scale_text(
    meta = out$meta,
    tdm = tdm
    )

document_scores <- score_documents(
    scores = scores, n_dimensions = 10
    )

## End(Not run)

wilryh/parrot documentation built on Jan. 9, 2020, 2:16 p.m.