class WordNet::Pointer
Pointers represent the relations between the words in one synset and another.
Attributes
offset[R]
The offset, in bytes, of this pointer in WordNet's internal database.
pos[R]
The part of speech this pointer represents. One of 'n', 'v', 'a' (adjective), or 'r' (adverb).
source[R]
The synset from which this pointer…points.
symbol[R]
The symbol that devices the relationship this pointer represents, e.g. “!” for verb antonym. Valid pointer symbols are defined in pointers.rb
target[R]
The synset to which this pointer…points.
Public Class Methods
new(symbol: raise, offset: raise, pos: raise, source: raise)
click to toggle source
Create a pointer. Pointers represent the relations between the words in one synset and another, and are referenced by a shorthand symbol (e.g. '!' for verb antonym). The list of valid pointer symbols is defined in pointers.rb
# File lib/rwordnet/pointer.rb, line 23 def initialize(symbol: raise, offset: raise, pos: raise, source: raise) @symbol, @offset, @pos, @source = symbol, offset, pos, source @target = source.slice!(2,2) end
Public Instance Methods
is_semantic?()
click to toggle source
# File lib/rwordnet/pointer.rb, line 28 def is_semantic? source == "00" && target == "00" end