Learn R Programming

qdap (version 0.2.5)

synonyms: Search For Synonyms

Description

Search for synonyms that match term(s).

Usage

synonyms(terms, return.list = TRUE, multiwords = TRUE,
    report.null = TRUE)

  syn(terms, return.list = TRUE, multiwords = TRUE,
    report.null = TRUE)

Arguments

terms
The terms to find synonyms for.
return.list
logical. If TRUE returns the output for multiple synonyms as a list by search term rather than a vector.
multiwords
logical. IF TRUE retains vector elements that contain phrases (defined as having one or more spaces) rather than a single word.
report.null
logical. If TRUE reports the words that no match was found at the head of the output.

Value

  • Returns a list of vectors or vector of possible words that match term(s).

References

The synonyms dictionary (see SYNONYM) was generated by web scraping the http://dictionary.reverso.net/english-synonyms/{Reverso Online Dictionary}. The word list fed to http://dictionary.reverso.net/english-synonyms/{Reverso} is the unique words from the combination of DICTIONARY and labMT.

Examples

Run this code
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)

Run the code above in your browser using DataLab