wn.replace: Replace synonyms

Description Usage Arguments Details Value Author(s)

Description

Replaces terms by their synonyms, if these synonyms were also found in the text.

Usage

1

Arguments

terms

A character vector of terms.

protect

A numerical vector indicating the index of terms in wn.replace(terms)$replacements[,1] that should not be replaced.

Details

Should be performed twice if some terms should not be replaced by synonyms or by a certain synonym. First time with protect=NULL. Second time with protect being a numerical vector indicating the index of terms that should not be replaced.\ Uses the wordnet package to find synonyms.

Value

$terms

Returns the input text with replaced synonyms.

$replacements

A matrix with two columns, where the first column contains a term for which a synonym was found in the same text and the second column contains the synonym found.

Author(s)

Ingo Feinerer and Angela Bohn angela.bohn at gmail.com


snatm documentation built on May 2, 2019, 5:01 p.m.

Related to wn.replace in snatm...