gate.creole.morph
Class Interpret

java.lang.Object
  extended by gate.creole.morph.Interpret

public class Interpret
extends Object

Title: Interpret.java

Description: This is the main class which which should be invoked to load the rule file in the system and then to execute the program to find the root word and the affix to it.


Field Summary
protected  boolean foundRule
           
protected  FSMState initialState
          The initial state of the FSM that backs this morpher
protected  Set lastStates
           
protected  int patternIndex
           
 
Constructor Summary
Interpret()
           
 
Method Summary
 void addState(char ch, FSMState fsm, int index)
           
protected  String executeRHS(String word, String category, RHS rhs)
           
protected  String executeRHSes(SortedSet rhses, String word, String category)
           
 String getAffix()
          This method tells what was the affix to the provided word
 FSMState getInitialState()
           
 int getPatternIndex()
           
 FSMState getState(char ch, int index)
           
 void init(Interpret existingInterpret)
          Initialize this Interpret by copying pointers to the sharable state of an existing Interpret instance.
 void init(URL ruleFileURL)
          It starts the actual program
static void main(String[] args)
          Main method
 String runMorpher(String word, String category)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initialState

protected FSMState initialState
The initial state of the FSM that backs this morpher


lastStates

protected Set lastStates

patternIndex

protected int patternIndex

foundRule

protected boolean foundRule
Constructor Detail

Interpret

public Interpret()
Method Detail

init

public void init(URL ruleFileURL)
          throws ResourceInstantiationException
It starts the actual program

Throws:
ResourceInstantiationException

init

public void init(Interpret existingInterpret)
Initialize this Interpret by copying pointers to the sharable state of an existing Interpret instance.


addState

public void addState(char ch,
                     FSMState fsm,
                     int index)

getState

public FSMState getState(char ch,
                         int index)

runMorpher

public String runMorpher(String word,
                         String category)
Returns:
set of the Lookups associated with the parameter

getPatternIndex

public int getPatternIndex()

executeRHSes

protected String executeRHSes(SortedSet rhses,
                              String word,
                              String category)

executeRHS

protected String executeRHS(String word,
                            String category,
                            RHS rhs)

main

public static void main(String[] args)
                 throws ResourceInstantiationException
Main method

Parameters:
args -
Throws:
ResourceInstantiationException

getAffix

public String getAffix()
This method tells what was the affix to the provided word

Returns:
affix

getInitialState

public FSMState getInitialState()