class WordNet::SemanticLink

WordNet semantic link (pointer) model class

Public Instance Methods

to_s() click to toggle source

Return a stringified version of the SemanticLink.

# File lib/wordnet/semanticlink.rb, line 31
def to_s
        return "%s: %s (%s)" % [
                self.type,
                self.target.words.map( &:to_s ).join( ', ' ),
                self.target.pos,
        ]
end
type() click to toggle source

Return the type of link as a Symbol.

# File lib/wordnet/semanticlink.rb, line 41
def type
        return WordNet::Synset.linktype_table[ self.linkid ][ :type ]
end
typename() click to toggle source

Return the name of the link type as a String.

# File lib/wordnet/semanticlink.rb, line 47
def typename
        return WordNet::Synset.linktype_table[ self.linkid ][ :typename ]
end