|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sf.jhunlang.jmorph.AffixEntry
The common base class of PrefixEntry and SuffixEntry.
| Field Summary | |
protected int |
al
Length of append |
protected java.lang.String |
append
The characters to append to stripped stems |
protected java.lang.String |
caseEnding
|
protected int |
cl
Length of conditions |
protected Condition[] |
conditions
Condition array of this entry without those for strip |
protected Conditions |
conds
Conditions of this entry without those for strip |
protected int |
condsIndex
Index of conds in Conditions |
protected java.lang.String |
contentString
The String representation of this instance |
protected boolean |
crossable
If this entry can be crossed |
protected AffixEntryExtension |
extension
Stores future extension data (like description). |
protected int |
flag
Flag of parent |
protected java.lang.String |
flagAndCaseString
|
protected AffixFlags |
flags
Stores crossable/derivation affix flags |
protected boolean |
ignoreCase
|
protected int |
index
Index of this entry at parent |
protected java.lang.String |
lowerCaseStrip
The characters to strip from a stem before adding append |
protected Affix |
parent
Parent of this entry |
protected int |
sl
Length of strip. |
protected java.lang.String |
strip
The characters to strip from a stem before adding append |
protected Condition[] |
stripConditions
Condition array of this entry for strip |
| Constructor Summary | |
protected |
AffixEntry(Rules rules,
Affix parent,
int index,
Condition[] acondition,
java.lang.String strip,
java.lang.String append)
Create a new AffixEntry instance with the given parameters. |
| Method Summary | |
abstract java.lang.String |
addLowerCaseStrip(java.lang.String word)
Add strip all lowercase to word and return the
resulted string. |
abstract java.lang.String |
addStrip(java.lang.String word)
Add strip to word and return the resulted string. |
boolean |
admitStem(java.lang.CharSequence word)
Return if word satisfies conditions. |
boolean |
admitStem(java.lang.CharSequence word,
BooleanResults results)
Return if word satisfies conditions. |
abstract java.lang.String |
append(java.lang.String word)
Return the word by appending append word. |
abstract boolean |
check4Inflexion(java.lang.CharSequence word)
Return if word satisfies stripConditions. |
abstract boolean |
checkStem(java.lang.CharSequence word)
Return if word satisfies conditions. |
java.lang.String |
contentString()
Return the String representation of this entry. |
boolean |
crossable()
Return if this entry can be crossed. |
DictEntry |
derive(java.lang.String word,
DictEntry root)
Create and return a DictEntry instance for derivation of
word by this entry. |
java.lang.String |
getAppend()
Return the string this entry appends/prepends to stems. |
abstract char |
getAppendCharAt(int i)
|
java.lang.String |
getCase()
|
java.lang.String |
getCaseEnding()
|
protected java.lang.String |
getClassNameString()
|
AffixEntryExtension |
getExtension()
Return the extension of this entry. |
int |
getFlag()
Return the flag (the caracter identifier) of this entry. |
java.lang.String |
getFlagAndCaseString()
|
AffixFlags |
getFlags()
Return flags of this entry. |
int |
getIndex()
Return the index of this entry in its parent Affix. |
Affix |
getParent()
Return the parent Affix of this entry. |
java.lang.String |
getStrip()
Return the string this entry strips off from stems before appending. |
int |
getStripLength()
Return the length of strip. |
boolean |
hasFlag(int flag)
Return if flags contains flag. |
boolean |
ignoreCase()
|
java.lang.String |
inflex(java.lang.String word)
Return the word by stripping strip from and
appending append to word. |
java.lang.String |
longContentString()
Return the String representation of this entry. |
java.lang.String |
morphString()
|
int |
rawConditionLength()
Return length of conditions. |
abstract java.lang.String |
reverse(java.lang.String word)
Return the word by stripping append from and
appending strip to word. |
boolean |
same()
Return if inflexing with this affix gives back the word itself i.e. |
void |
setExtension(AffixEntryExtension extension)
|
void |
setFlags(char[] flagCharacters)
Set the flags of this entry. |
void |
setIgnoreCase(boolean ignoreCase)
|
abstract java.lang.String |
strip(java.lang.String word)
Strip off strip from word. |
java.lang.String |
toLongString()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Affix parent
protected int index
protected int flag
protected Conditions conds
Conditions of this entry without those for strip
protected int condsIndex
conds in Conditions
protected Condition[] conditions
Condition array of this entry without those for strip
protected int cl
conditions
protected Condition[] stripConditions
Condition array of this entry for strip
protected boolean crossable
protected boolean ignoreCase
protected java.lang.String caseEnding
protected java.lang.String flagAndCaseString
protected java.lang.String strip
append
protected java.lang.String lowerCaseStrip
append
protected int sl
strip. sl is the length of
stripConditions as well.
protected java.lang.String append
protected int al
append
protected AffixFlags flags
protected AffixEntryExtension extension
protected transient java.lang.String contentString
| Constructor Detail |
protected AffixEntry(Rules rules,
Affix parent,
int index,
Condition[] acondition,
java.lang.String strip,
java.lang.String append)
strip and append can be null.
rules - the rules this affix belongs toparent - the Affix parentindex - the index of this entry at its parent (informal)acondition - the conditions of this entrystrip - the characters to strip from stems before adding appendappend - the characters to append to stripped stems
throws IllegalArgumentException if either strip or append is null
or strip doesn't satisfy the conditions| Method Detail |
public boolean same()
strip is append.
public int getStripLength()
strip.
strip
public DictEntry derive(java.lang.String word,
DictEntry root)
DictEntry instance for derivation of
word by this entry. If extension is not
null then call its derive method,
otherwise create DictEntry for word with
root and flags.
word - the derived wordroot - the root of the derivatoin
DictEntry representing word as derived
from root by this entrypublic java.lang.String getCaseEnding()
public java.lang.String getCase()
public boolean crossable()
public Affix getParent()
Affix of this entry.
public java.lang.String getAppend()
public java.lang.String getStrip()
public int getIndex()
Affix.
public int getFlag()
public int rawConditionLength()
conditions.
public boolean admitStem(java.lang.CharSequence word)
word satisfies conditions.
Calls checkStem(java.lang.CharSequence).
word - the word to check
word satisfies the conditions
public boolean admitStem(java.lang.CharSequence word,
BooleanResults results)
word satisfies conditions.
This method uses the result caching mechanism of Conditions
by calling checkStem(java.lang.CharSequence) only if the cached
result in results is invalid.
word - the word to check
word satisfies the conditionspublic void setFlags(char[] flagCharacters)
flags of this entry.
flagCharacters - the flag characters to setpublic AffixFlags getFlags()
flags of this entry.
flags of this entry.public java.lang.String getFlagAndCaseString()
public void setExtension(AffixEntryExtension extension)
public AffixEntryExtension getExtension()
extension of this entry.
extension of this entrypublic boolean ignoreCase()
ignoreCase.public void setIgnoreCase(boolean ignoreCase)
ignoreCase - the ignoreCase to set.public boolean hasFlag(int flag)
flags contains flag.
flag - the flag to check
flags contains flagpublic abstract boolean checkStem(java.lang.CharSequence word)
word satisfies conditions.
word - the word to check
conditionspublic abstract boolean check4Inflexion(java.lang.CharSequence word)
word satisfies stripConditions.
word - the word to check
stripConditionspublic abstract java.lang.String addStrip(java.lang.String word)
strip to word and return the resulted string.
word - the word strip to be added to
strip to wordpublic abstract java.lang.String addLowerCaseStrip(java.lang.String word)
strip all lowercase to word and return the
resulted string.
word - the word strip to be added to
strip to
wordpublic abstract java.lang.String strip(java.lang.String word)
strip from word.
word - the word to strip
public abstract java.lang.String append(java.lang.String word)
append word.
word - the word append to be added to
public abstract java.lang.String reverse(java.lang.String word)
append from and
appending strip to word.
word - the word to reverse
public abstract char getAppendCharAt(int i)
public final java.lang.String inflex(java.lang.String word)
strip from and
appending append to word.
word - the word to inflex
public java.lang.String morphString()
public java.lang.String longContentString()
public java.lang.String contentString()
protected java.lang.String getClassNameString()
public java.lang.String toLongString()
public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||