R/synonyms.R

Defines functions synonyms

Documented in synonyms

synonyms <-
function(word, pos)
{
    filter <- getTermFilter("ExactMatchFilter", word, TRUE)
    terms <- getIndexTerms(pos, 1L, filter)
    if (is.null(terms))
        character()
    else
        getSynonyms(terms[[1L]])
}

Try the wordnet package in your browser

Any scripts or data that you put into this service are public.

wordnet documentation built on Feb. 16, 2023, 10:19 p.m.