Fido Alpha 3.2

Class GrammarModule


public class GrammarModule
extends java.lang.Object

This is the Workflow module that interacts with the grammar package. Using the linkSentnece() method, this module will take all of the words in the Vector parameter and insert them into a new Grammar. Returned is the list of links.

Constructor Summary
Method Summary
 java.util.Vector linkSentence(java.util.Vector wordPackages)
          Links the words in the Vector wordPackages.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public GrammarModule()
Method Detail


public java.util.Vector linkSentence(java.util.Vector wordPackages)
                              throws GrammarParseException
Links the words in the Vector wordPackages. Each call will start with an empty grammar stack and, upon completion, the grammar will be cleared.

The grammar package may contain zero to many valid parsings. If no parsings are returned, the sentence is not valid for the given grammar. If a valid grammar is found, the return Vector will contain an entry for each valid sentence. So if two valid parsings were found, the return Vector would contain two entries. Each entry returned in the return Vector is itself a Vector containing the list of links that combine the words.

wordPackages - words to link together.
Vector of Vectors containing the links between the words. Each of the first Vector is list of parsings, containing a Vector of all links.
GrammarParseException - an error occured while parsing the sentence.

Fido Alpha 3.2