com.sun.labs.minion.lexmorph
Class MorphState

java.lang.Object
  extended by com.sun.labs.minion.lexmorph.MorphState

public class MorphState
extends java.lang.Object

This is a class of objects used to carry the state of a morphological analysis. MorphState was designed to support multithreading by allowing each morph thread to instantiate a different MorphState instance to keep the state of morphological analyses on that thread. During morphological analysis, additional instances of MorphState may be created for managing the morphological analyses of potential roots of a word being analyzed.


Field Summary
protected  int action
           
protected  java.lang.String addLeftString
           
protected  java.lang.String addRightString
           
protected  Word apparentRoot
           
protected  Value capcode
           
protected  java.util.Vector catSenses
           
protected static java.lang.String className
           
protected  boolean cModeKnownFlag
           
protected  MorphCompoundRule compoundRule
           
protected  java.lang.String connector
           
protected  boolean doneFlag
           
 MorphEngine frame
           
protected  boolean keepMorphCacheFlag
           
protected  int killLeftNum
           
protected  int killRightNum
           
protected  boolean knownRoot
           
protected  int leftContextPtr
           
protected  Word lex
           
protected  java.lang.String lexString
           
protected  int likelihood
           
protected  boolean matched
           
protected  java.util.Hashtable morphCache
           
protected  boolean phaseOneFlag
           
protected  boolean phaseTwoFlag
           
protected  Word prefix
           
protected  boolean prefixPhaseFlag
           
protected  java.lang.String prefixString
           
protected  int rightContextPtr
           
protected  Word root
           
protected  java.lang.String rootString
           
protected  MorphRule rule
           
protected  int ruleNum
           
protected  java.lang.String substitutionString
           
protected  Word suffix
           
protected  java.lang.String suffixString
           
protected  boolean testval
           
protected  Word word1
           
protected  Word word2
           
 
Constructor Summary
MorphState()
          Create a MorphState
MorphState(int startDepth, java.util.Hashtable cache)
          Create a MorphState
MorphState(int startDepth, java.util.Hashtable cache, MorphEngine morph, MorphRule testrule, java.lang.String teststring)
          Create a MorphState for testing a MorphRule
 
Method Summary
 void initialize()
          Method to initialize a state for reuse.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

morphCache

protected java.util.Hashtable morphCache

frame

public MorphEngine frame

lex

protected Word lex

lexString

protected java.lang.String lexString

cModeKnownFlag

protected boolean cModeKnownFlag

rule

protected MorphRule rule

ruleNum

protected int ruleNum

action

protected int action

matched

protected boolean matched

root

protected Word root

rootString

protected java.lang.String rootString

apparentRoot

protected Word apparentRoot

capcode

protected Value capcode

addLeftString

protected java.lang.String addLeftString

addRightString

protected java.lang.String addRightString

substitutionString

protected java.lang.String substitutionString

killLeftNum

protected int killLeftNum

killRightNum

protected int killRightNum

leftContextPtr

protected int leftContextPtr

rightContextPtr

protected int rightContextPtr

testval

protected boolean testval

likelihood

protected int likelihood

phaseOneFlag

protected boolean phaseOneFlag

phaseTwoFlag

protected boolean phaseTwoFlag

prefixPhaseFlag

protected boolean prefixPhaseFlag

knownRoot

protected boolean knownRoot

catSenses

protected java.util.Vector catSenses

prefixString

protected java.lang.String prefixString

suffixString

protected java.lang.String suffixString

prefix

protected Word prefix

suffix

protected Word suffix

doneFlag

protected boolean doneFlag

compoundRule

protected MorphCompoundRule compoundRule

word1

protected Word word1

word2

protected Word word2

connector

protected java.lang.String connector

keepMorphCacheFlag

protected boolean keepMorphCacheFlag

className

protected static java.lang.String className
Constructor Detail

MorphState

public MorphState()
Create a MorphState


MorphState

public MorphState(int startDepth,
                  java.util.Hashtable cache)
Create a MorphState

Parameters:
startDepth - The depth of analysis this state is used for.
cache - The morphCache to use at this level.

MorphState

public MorphState(int startDepth,
                  java.util.Hashtable cache,
                  MorphEngine morph,
                  MorphRule testrule,
                  java.lang.String teststring)
Create a MorphState for testing a MorphRule

Parameters:
startDepth - The depth of analysis this state is used for.
cache - The morphCache to use for this test.
morph - The MorphEngine to use.
testrule - A Rule to test.
teststring - A string to test the rule against.
Method Detail

initialize

public void initialize()
Method to initialize a state for reuse.