Fido Alpha 3.2

fido.linguistic.components
Class NounPhrase

java.lang.Object
  |
  +--fido.linguistic.components.NounPhrase
All Implemented Interfaces:
Noun

public class NounPhrase
extends java.lang.Object
implements Noun

Represents a noun, with all associated components such as an optional article, all of the adjectives, and all prepositional phrases.


Field Summary
static int CREATE_INSTANCE
          Constant used by getAction() and setAction()
static int EXISTING_CLASS
          Constant used by getAction() and setAction()
static int EXISTING_INSTANCE
          Constant used by getAction() and setAction()
 
Constructor Summary
NounPhrase()
          Creates a new NounPhrase object with no adjectives or prepositional phrases.
 
Method Summary
 void addAdjective(AdjectiveClass adj)
          Adds an AdjectiveClass to this noun phrase.
 void addPrepositionalPhrase(PrepositionalPhrase phrase)
          Adds an PrepositionalPhrase to this noun phrase.
 int getAction()
          Returns the action the system should perform when resolving this noun phrase.
 java.util.Iterator getAdjectives()
          Returns an Iterator over all of the AdjectiveClass modifying this noun phrase.
 int getArticleType()
          Returns the type of the article.
 NounClass getNounClass()
          Returns the NounClass for this noun phrase.
 java.util.Iterator getPrepositionalPhrases()
          Returns an Iterator over all of the PrepositionalPhrases modifying this noun phrase.
 void setAction(int action)
          When resolving nouns in the Resolver module, this method is used to store the action the system should take when resolving the noun.
 void setArticleType(int type)
          Sets the type for the article.
 void setNounClass(NounClass noun)
          Sets the NounClass for this noun phrase.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXISTING_INSTANCE

public static final int EXISTING_INSTANCE
Constant used by getAction() and setAction()

See Also:
Constant Field Values

CREATE_INSTANCE

public static final int CREATE_INSTANCE
Constant used by getAction() and setAction()

See Also:
Constant Field Values

EXISTING_CLASS

public static final int EXISTING_CLASS
Constant used by getAction() and setAction()

See Also:
Constant Field Values
Constructor Detail

NounPhrase

public NounPhrase()
Creates a new NounPhrase object with no adjectives or prepositional phrases. Sets the article to none.

Method Detail

getAction

public int getAction()
Returns the action the system should perform when resolving this noun phrase. For a detail description on the value returned, see setAction().

Returns:
The action for the system to perform for this noun phrase.
See Also:
setAction(int)

setAction

public void setAction(int action)
When resolving nouns in the Resolver module, this method is used to store the action the system should take when resolving the noun. The system could do the following: See the resolve() method in the NounResolver module for a detain description on Sentence Patterns and how Nouns are resolved.

See Also:
Discourse, ObjectTable, NounResolver.resolve(NounPhrase)

getArticleType

public int getArticleType()
Returns the type of the article. Constant values are defined in ArticleTable.

Returns:
The type of article for this noun phrase.
See Also:
ArticleTable

setArticleType

public void setArticleType(int type)
Sets the type for the article. Constant values are defined in ArticleTable.

See Also:
ArticleTable

getNounClass

public NounClass getNounClass()
Returns the NounClass for this noun phrase. This is the actual noun string and any associated Morphology tags.

Returns:
The NounClass for this noun phrase.

setNounClass

public void setNounClass(NounClass noun)
Sets the NounClass for this noun phrase. This is the actual noun string and any associated Morphology tags.

Parameters:
noun - The NounClass for this noun phrase.

getAdjectives

public java.util.Iterator getAdjectives()
Returns an Iterator over all of the AdjectiveClass modifying this noun phrase.

Returns:
An Iterator of AdjectiveClass classes.

addAdjective

public void addAdjective(AdjectiveClass adj)
Adds an AdjectiveClass to this noun phrase. The AdjectiveClass represents an adjective modifying the noun.

Parameters:
adj - Adjective to add.

getPrepositionalPhrases

public java.util.Iterator getPrepositionalPhrases()
Returns an Iterator over all of the PrepositionalPhrases modifying this noun phrase.

Returns:
An Iterator of PrepositionalPhrase classes.

addPrepositionalPhrase

public void addPrepositionalPhrase(PrepositionalPhrase phrase)
Adds an PrepositionalPhrase to this noun phrase. The PrepositionalPhrase represents an adjectivial prepositional phrase modifying the noun.

Parameters:
phrase - PrepositionalPhrase to add.

Fido Alpha 3.2