Class WordNet::Synset::Pointer
In: lib/wordnet/synset.rb
Parent: Object

The "pointer" type that encapsulates relationships between one synset and another.

Methods
==    inspect    new    parse    pos    synset    to_s    typeSymbol   
Attributes
offset  [RW] 

The offset of the target synset

partOfSpeech  [RW] 

The part-of-speech of the target synset. Will be one of the keys of WordNet::SyntacticCategories.

sourceWn  [RW] 

The word number in the source synset

subtype  [RW] 

The subtype of the pointer, if any. Will be one of the keys of one of the hashes in PointerSubTypes (e.g., :portion).

targetWn  [RW] 

The word number in the target synset

type  [RW] 

The type of the pointer. Will be one of the keys of WordNet::PointerTypes (e.g., :meronym).

Included modules
WordNet::Constants CrossCase
Public Class methods
parse( pointerString )

Make an Array of WordNet::Synset::Pointer objects out of the given pointerList. The pointerlist is a string of pointers delimited by Constants::SubDelim. Pointers are in the form:

  "<pointer_symbol> <synset_offset>%<pos> <source/target>"
new( type, offset, pos=Noun, sourceWn=0, targetWn=0 )

Create a new synset pointer with the given arguments. The ptrType is the type of the link between synsets, and must be either a key or a value of WordNet::Constants::PointerTypes. The offset is the unique identifier of the target synset, and pos is its part-of-speech, which must be either a key or value of WordNet::Constants::SyntacticCategories. The sourceWn and targetWn are numerical values which distinguish lexical and semantic pointers. sourceWn indicates the word number in the current (source) synset, and targetWn indicates the word number in the target synset. If both are 0 (the default) it means that the pointer type of the pointer represents a semantic relation between the current (source) synset and the target synset indicated by offset.

Public Instance methods
inspect()

Return the Pointer as a human-readable String suitable for debugging.

synset()

Return the synset key of the target synset (i.e., <offset>%<pos symbol>).

pos()

Return the syntactic category symbol for this pointer

typeSymbol()

Return the pointer type symbol for this pointer

==( other )

Comparison operator. Pointer are equivalent if they point at the same synset and are of the same type.

to_s()

Return the pointer in its stringified form.