fido.linguistic
Class FragmentResolver
java.lang.Object
|
+--fido.linguistic.FragmentResolver
- public class FragmentResolver
- extends java.lang.Object
This module attempts to take a fragment of a sentence, or the answer to
a question asked by the system, and create a full, properly formed sentence.
If the Discourse module holds that the previous
sentence was either informational or a command, the fragment is passed to
the Ellipsis module. If the previous sentence was
a question by the system, the Question Resolver
moudle will rephrase the question and answer to make an informational statement
the system can process.
- See Also:
Fragment
,
Ellipsis
,
QuestionResolver
Method Summary |
void |
resolve(java.util.Vector clauses)
Loops through the Vector of Clauses for any instance of
Fragment. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FragmentResolver
public FragmentResolver(Discourse discourse)
- Creates a new FragmentResolver instance.
- Parameters:
discourse
- Current discourse between user and system.
resolve
public void resolve(java.util.Vector clauses)
throws FidoDatabaseException,
ObjectNotFoundException,
MultipleEllipsisMatchException,
NoEllipsisMatchException,
NoPreviousDiscourseException
- Loops through the Vector of Clauses for any instance of
Fragment. If one is found, and the mood of the previous
sentence, stored in the discourse passed to the constructor,
was a command, pass the clause to the Ellipsis module.
Ohterwise the mood of the previous sentence was a question,
so the fragment will be passed to the QuestionResolver.
- Parameters:
clauses
- Vector of clauses to analyze.
- Throws:
FidoDatabaseException
- Thrown if there is an error contacting or
processing a database request.
ObjectNotFoundException
- Thrown if an object id one of the ResolvedNoun
classes is not found. This should never happen.
NoEllipsisMatchException
- Thrown if a NounPhrase in the previous
input was not found to replace the current.
MultipleEllipsisMatchException
- Thrown if there are multiple NounPhrase
in the previous input that replace the current.
NoPreviousDiscourseException
- Thrown if there was no previous sentence
in the discourse. This means the first
statement the user enters is a fragment.- See Also:
Ellipsis
,
QuestionResolver