Description Usage Arguments Value References Examples
synonyms
- Search for synonyms that match term(s).
synonyms_frame
- Generate a synonym lookup hash key
for use with the synonym.frame
argument in the synonym
function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | synonyms(
terms,
return.list = TRUE,
multiwords = TRUE,
report.null = TRUE,
synonym.frame = qdapDictionaries::key.syn
)
syn(
terms,
return.list = TRUE,
multiwords = TRUE,
report.null = TRUE,
synonym.frame = qdapDictionaries::key.syn
)
synonyms_frame(synonym.list, prior.frame)
syn_frame(synonym.list, prior.frame)
|
terms |
The terms to find synonyms for. |
return.list |
logical. If |
multiwords |
logical. IF |
report.null |
logical. If |
synonym.frame |
A dataframe or hash key of positive/negative words and weights. |
synonym.list |
A named list of lists (or vectors) of synonyms. |
prior.frame |
A prior synonyms data.frame in the format produced by
|
Returns a list of vectors or vector of possible words that match term(s).
The synonyms dictionary (see key.syn
) was
generated by web scraping the Reverso (https://dictionary.reverso.net/english-synonyms/) Online Dictionary.
The word list fed to Reverso
is the unique words from the combination of DICTIONARY
and labMT
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
synonyms(c("the", "cat", "job", "environment", "read", "teach"))
head(syn(c("the", "cat", "job", "environment", "read", "teach"),
return.list = FALSE), 30)
syn(c("the", "cat", "job", "environment", "read", "teach"), multiwords = FALSE)
## User defined synonym lookup
syn_dat <- list(
like = list(c("want", "desire"), c("love", "care")),
show = list(c("reveal"), c("movie", "opera")),
R = c("old friend", "statistics language")
)
synonyms_frame(syn_dat)
syn(c("R", "show"), synonym.frame = syn_frame(syn_dat))
syns.hash <- syn_frame(syn_dat, prior.frame = qdapDictionaries::key.syn)
syn(c("R", "show", "like", "robot"), synonym.frame = syns.hash)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.