Fido Alpha 3.2

fido.grammar
Class Link

java.lang.Object
  |
  +--fido.grammar.Link

public class Link
extends java.lang.Object

A Link represents the grammatical relationship between two words. The Grammar module combines words based on a language called Link Grammar. Link Grammar parses the the user input into parts of speech by combining symbolic letter combinations that represent parts of speech. When two words are combine, a link is formed. This class represents that link.

See Also:
Grammar

Constructor Summary
Link(java.lang.String linkName, WordSense leftWordSense, WordSense rightWordSense)
          Creates a new Link with the part of speech link name linkName.
 
Method Summary
 WordSense getLeftWordSense()
          Returns the left WordSense of the link.
 java.lang.String getLinkName()
          Returns the link name that this class represents.
 WordSense getRightWordSense()
          Returns the right WordSense of the link.
 boolean isUsed()
          Returns the value of the used flag for the link.
 void setUsed()
          Sets the used flag to true for this link.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Link

public Link(java.lang.String linkName,
            WordSense leftWordSense,
            WordSense rightWordSense)
Creates a new Link with the part of speech link name linkName. The WordSense leftWordSense and rightWordSense are the WordSense objects that are combine. The left and right denote the order of the WordSense in the sentence, and have no bearing on the parsing of the sentnece.

Parameters:
linkName - name of the link
leftWordSense - pointer to the left node of the link
rightWordSense - pointer to the right node of the link
Method Detail

getLinkName

public java.lang.String getLinkName()
Returns the link name that this class represents.

Returns:
link name for the class which is a String

getLeftWordSense

public WordSense getLeftWordSense()
Returns the left WordSense of the link. The left simply denotes the order of the WordSense in the sentence and has no bearing on the parsing.

Returns:
reference to the left WordSense of the link

getRightWordSense

public WordSense getRightWordSense()
Returns the right WordSense of the link. The right simply denotes the order of the WordSense in the sentence and has no bearing on the parsing.

Returns:
reference to the right word of the link

isUsed

public boolean isUsed()
Returns the value of the used flag for the link. The SentenceComponents module will cruise through the list of links and use each one to put the word into the proper slot of the sentence components tree. As each link is used, the used flag is set to true to signal the link has been used before.

Returns:
True if the link has been used. False otherwise
See Also:
SentenceComponents

setUsed

public void setUsed()
Sets the used flag to true for this link. See isUsed() for a description of the used flag.

See Also:
isUsed()

Fido Alpha 3.2