public class CategoryInflectionRule extends SuffixInflectionRule
Original code written by Tom White under the Apache v2 license. Modified by Philip R. Burns for integration into MorphAdorner.
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
regex |
pluralSuffix, singularSuffix| Constructor and Description |
|---|
CategoryInflectionRule(java.lang.String[] words,
java.lang.String singularSuffix,
java.lang.String pluralSuffix)
Construct a rule for
words with suffix
singularSuffix which becomes pluralSuffix
in the plural. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
applies(java.lang.String word)
Tests to see if this rule applies for the given word.
|
applypublic CategoryInflectionRule(java.lang.String[] words,
java.lang.String singularSuffix,
java.lang.String pluralSuffix)
words with suffix
singularSuffix which becomes pluralSuffix
in the plural.words - The set of words which define this category.singularSuffix - The singular suffix, starting with a
"-" characterpluralSuffix - The plural suffix, starting with a "-"
character.public boolean applies(java.lang.String word)
applies in interface WordRuleapplies in class SuffixInflectionRuleword - The word that is being testedtrue if this rule should be applied,
false otherwise