- public class SentenceComponents
- extends java.lang.Object
This module will take the Grammar linkages from the Grammar module and
place them into in internal class structure. This is the translation
from the syntactic form of the sentence to an internal semantic view.
- See Also:
Converts the Vector of Link classes from Grammar to an internal
structure that represents the sentence.
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
- Creates a new SentenceComponents instance.
public java.util.Vector translate(java.util.Vector sentences)
- Converts the Vector of Link classes from Grammar to an internal
structure that represents the sentence. The internal structure
holds the noun phrases (subject, direct and indirect objects)
as well as verb information. Prepositional phrases are attached
to the appropriate class.
- Determine if the sentence is a fragment or a full sentence.
If the linkage represents a full sentence, the LEFT-WALL
will have a V link to the verb of the sentence. A fragment
will have an NP link to a noun phrase.
- Depending on the type of clause as determined above, the
appropriate implementation of Clause will be created: Sentence
- The Verb, if found, will create a VerbPhrase class and attach
to the Sentence class.
- Any adjectives or prepositional phrases modifying the verb
are attached to the VerbPhrase.
- Either off of the Verb or the LEFT-WALL, the Nouns will each
create a NounPhrase.
- Each Noun may have an Article, multiple Adjectives, and multiple
Prepositional Phrases. Each of these will create the appropriate
class and attach to the NounPhrase class.
- Each Noun will be linked to the Verb via a Noun type link. Some
Noun links in the GrammarLinkList will have a NounType. A SentencePosition
will be either Subject, PredicateNoun1, or PredicateNoun2. PredicateNoun1 can
be a DirectObject, a PredicateNoun, or an Indirect Object. If
PredicateNoun1 is an IndirectObject, PredicateNoun2 will be the DirectObject.
The sentence could also have a PredicateAdjective, in which the adjective
link in the GrammarLinkList will have a SentencePosition of
sentences - Vector of Vectors each containing one valid linkage. The second
Vector contains a list of Link classes, realized from the
- A Vector of Clauses, each containing the semantic structure for each valid
linkage passed in.
FidoException - General exception thrown if the linkage could not
be processed. The exception will contain a wrapped
exception that is the root cause.
- See Also: