R/synsets.R

Defines functions getWord getRelatedSynsets

Documented in getRelatedSynsets getWord

getRelatedSynsets <-
function(synset, pointerSymbol)
{
    l <- .jcall(synset, "Ljava/util/List;", "getRelatedSynsets",
                pointerSymbol)
    if(is.null(l)) return(list())
    iterator <- .jcall(l, "Ljava/util/Iterator;", "iterator")
    i <- .jevalIterator(iterator)
    lapply(i, .jcast, "Lcom/nexagis/jawbone/Synset;")
}

getWord <-
function(synset)
{
    l <- .jcall(synset, "Ljava/util/List;", "getWord")
    iterator <- .jcall(l, "Ljava/util/Iterator;", "iterator")
    i <- .jevalIterator(iterator)
    i <- lapply(i, .jcast, "Lcom/nexagis/jawbone/WordData;")
    sapply(i, .jcall, "S", "getWord")
}

Try the wordnet package in your browser

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

wordnet documentation built on Nov. 26, 2017, 5:06 p.m.