|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectasd.ASDGrammar
public class ASDGrammar
Instances are ASD grammars in the internal representation used by the ASD Parser.
| Field Summary | |
|---|---|
static java.lang.String |
DUMMYWORD
The string used in dummy nodes in an ASD grammar. |
| Constructor Summary | |
|---|---|
ASDGrammar()
Creates a new empty ASDGrammar. |
|
ASDGrammar(java.lang.String fileName,
boolean includeCoords)
Creates a new ASDGrammar from the character representation stored in a given file. |
|
ASDGrammar(java.lang.String fileName,
boolean includeCoords,
boolean markIncoming)
Creates a new ASDGrammar from the character representation stored in a given file. |
|
| Method Summary | |
|---|---|
java.util.HashMap<java.lang.String,java.util.ArrayList<ASDGrammarNode>> |
lexicon()
Returns the HashMap used to store the words and lists of instances in the grammar. |
ASDGrammarNode |
lookupInstance(ASDGrammarSuccessor successor)
Looks up a word instance in the grammar specified by a given ASDGrammarSuccessor. |
java.util.ArrayList<ASDGrammarNode> |
lookupWord(java.lang.String word)
Looks up a given string in the grammar and returns a list of instances for the word. |
void |
markNodesWithIncomingEdges()
Marks all ASDGrammarNodes in the grammar that have incoming edges. |
boolean |
nodesWithIncomingEdgesMarked()
Indicates whether all ASDGrammarNodes in the grammar that have incoming edges have already been marked. |
java.util.Set<java.lang.String> |
phraseTypes()
Returns a Set containing the phrase types recognized by the grammar. |
static void |
setDUMMYWORD(java.lang.String newValue)
Allows a client to reset the string which is used to represent a "dummy" word in the grammar -- used in the labels on dummy nodes. |
void |
setNodesWithIncomingEdgesNotMarked()
Allows a client to reset to false the flag which indicates whether nodes in the grammar with incoming edges have been marked. |
boolean |
uniqueInstance(java.lang.String word)
Indicates whether or not a specified word has exactly one instance in the lexicon/grammar. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String DUMMYWORD
| Constructor Detail |
|---|
public ASDGrammar()
public ASDGrammar(java.lang.String fileName,
boolean includeCoords)
throws java.io.IOException,
ASDInputException,
java.net.MalformedURLException
fileName - the name of the file to be usedincludeCoords - indicates whether or not to include
pixel coordinates in the grammar loaded, if they are
present. They are needed by ASDEditor but not by ASDParser.
java.io.IOException
ASDInputException
java.net.MalformedURLException
public ASDGrammar(java.lang.String fileName,
boolean includeCoords,
boolean markIncoming)
throws java.io.IOException,
ASDInputException,
java.net.MalformedURLException
fileName - the name of the file to be usedincludeCoords - indicates whether or not to include
pixel coordinates in the grammar loaded, if they are
present. They are needed by ASDEditor but not by ASDParser.markIncoming - indicates whether or not to mark grammar
nodes that have incoming edges, for use by the ASDparser
java.io.IOException
ASDInputException
java.net.MalformedURLException| Method Detail |
|---|
public java.util.HashMap<java.lang.String,java.util.ArrayList<ASDGrammarNode>> lexicon()
public ASDGrammarNode lookupInstance(ASDGrammarSuccessor successor)
successor - an ASDGrammarSuccessor specifying the word instance
public java.util.ArrayList<ASDGrammarNode> lookupWord(java.lang.String word)
word - the "word" string to be looked up
public void markNodesWithIncomingEdges()
public boolean nodesWithIncomingEdgesMarked()
public java.util.Set<java.lang.String> phraseTypes()
public static void setDUMMYWORD(java.lang.String newValue)
public void setNodesWithIncomingEdgesNotMarked()
public boolean uniqueInstance(java.lang.String word)
word - the "word" string to be looked up
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||