Fido Alpha 3.2

Class 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

Constructor Summary
FragmentResolver(Discourse discourse)
          Creates a new FragmentResolver instance.
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

Constructor Detail


public FragmentResolver(Discourse discourse)
Creates a new FragmentResolver instance.

discourse - Current discourse between user and system.
Method Detail


public void resolve(java.util.Vector clauses)
             throws FidoDatabaseException,
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.

clauses - Vector of clauses to analyze.
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

Fido Alpha 3.2