Lvg Java
2006p Version

gov.nih.nlm.nls.lvg.Trie
Class InflectionRule

java.lang.Object
  extended by gov.nih.nlm.nls.lvg.Trie.InflectionRule

public class InflectionRule
extends java.lang.Object

This class creates an object of LVG infelction rule, using a string format of a rule. The string format of a rule is described in the design document

History:

Version:
V-2006p
Author:
NLM NLS Development Team
See Also:
Design Document

Constructor Summary
InflectionRule(java.lang.String ruleStr)
          Create an object of inflection rule, using a rule String
 
Method Summary
 void AddException(java.lang.String line)
          Add a specific exception to the current inflection rule object.
 boolean equals(InflectionRule rule)
          Check if the current inflection rule object is the same as a specified inflection rule object by comparing rule strings.
 java.util.Hashtable GetExceptions()
          Get exceptions (in a hashtable) of the current inflection rule object.
 long GetInCategory()
          Get the input category of the current inflection rule object.
 java.lang.String GetInCategoryStr()
          Get the string format of the input category of the current inflection rule object.
 long GetInInflection()
          Get the input inflection of the current inflection rule object.
 java.lang.String GetInInflectionStr()
          Get the string format of the input inflection of the current inflection rule object.
 java.lang.String GetInSuffix()
          Get the input suffix of the current inflection rule object.
 long GetOutCategory()
          Get the output category of the current inflection rule object.
 java.lang.String GetOutCategoryStr()
          Get the string format of the output category of the current inflection rule object.
 long GetOutInflection()
          Get the output inflection of the current inflection rule object.
 java.lang.String GetOutInflectionStr()
          Get the string format of the output inflection of the current inflection rule object.
 java.lang.String GetOutSuffix()
          Get the output suffix of the current inflection rule object.
 java.lang.String GetRuleStr()
          Get the string representation of the current inflection rule object.
static void main(java.lang.String[] args)
          Test driver for this class
 void Reverse()
          Reverse entities for inputs and outputs for a inflection rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InflectionRule

public InflectionRule(java.lang.String ruleStr)
Create an object of inflection rule, using a rule String

See Also:
Design Document
Method Detail

Reverse

public void Reverse()
Reverse entities for inputs and outputs for a inflection rule. All nflection rules are bi-directional and stored on both cases while it was read in (once).


equals

public boolean equals(InflectionRule rule)
Check if the current inflection rule object is the same as a specified inflection rule object by comparing rule strings.

Parameters:
rule - a specified inflection rule object to be comapred
Returns:
true or false if the specified inflection rule object is or is not the same as the current rule object

GetInSuffix

public java.lang.String GetInSuffix()
Get the input suffix of the current inflection rule object.

Returns:
the String format of input suffix of the current inflection rule object

GetOutSuffix

public java.lang.String GetOutSuffix()
Get the output suffix of the current inflection rule object.

Returns:
the String format of output suffix of the current inflection rule object

GetExceptions

public java.util.Hashtable GetExceptions()
Get exceptions (in a hashtable) of the current inflection rule object.

Returns:
a hashtable to representing all exceptions of the current inflection rule object

GetRuleStr

public java.lang.String GetRuleStr()
Get the string representation of the current inflection rule object.

Returns:
a string representing the current inflection rule object

GetInCategory

public long GetInCategory()
Get the input category of the current inflection rule object.

Returns:
a long integer representing the input category of the current inflection rule object

GetInCategoryStr

public java.lang.String GetInCategoryStr()
Get the string format of the input category of the current inflection rule object.

Returns:
a string representing the input category of the current inflection rule object

GetInInflection

public long GetInInflection()
Get the input inflection of the current inflection rule object.

Returns:
a long integer the input inflection of the current inflection rule object

GetInInflectionStr

public java.lang.String GetInInflectionStr()
Get the string format of the input inflection of the current inflection rule object.

Returns:
a string representing the input inflection of the current inflection rule object

GetOutCategory

public long GetOutCategory()
Get the output category of the current inflection rule object.

Returns:
a long integer the output category of the current inflection rule object

GetOutCategoryStr

public java.lang.String GetOutCategoryStr()
Get the string format of the output category of the current inflection rule object.

Returns:
a string representing the output category of the current inflection rule object

GetOutInflection

public long GetOutInflection()
Get the output inflection of the current inflection rule object.

Returns:
a long integer the output inflection of the current inflection rule object

GetOutInflectionStr

public java.lang.String GetOutInflectionStr()
Get the string format of the output inflection of the current inflection rule object.

Returns:
a string representing the output inflection of the current inflection rule object

AddException

public void AddException(java.lang.String line)
Add a specific exception to the current inflection rule object.

Parameters:
line - the string representation of the specific exception to be added

main

public static void main(java.lang.String[] args)
Test driver for this class


Lvg Java
2006p Version

Submit a bug or feature

Copyright © 2006p National Library of Medicine