|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sf.jhunlang.jmorph.DictEntry
DictEntry instances represent the dictionary definitions.
The extensions XWordEntry and ExceptionEntry stand for
exceptional words and the exceptional solutions resolving
exceptional words respectively.
| Field Summary | |
static byte |
ALL_CAPITALIZED
Capitalization constant for all letters capital. |
static byte |
ALL_LOWER
Capitalization constant for all letters lower case. |
protected byte |
capitalization
The capitalization of the word. |
static byte |
CAPITALIZED
Capitalization constant for first letter capital. |
static java.lang.String[] |
CAPS
Printable names for capitalization types. |
protected AffixFlags |
flags
The affix flags admitted by this entry. |
static byte |
FUNNY_CAPITALIZED
Capitalization constant for funny capitalization. |
protected java.util.Collection |
homonyms
The homonyms of this word. |
protected DictEntryExtension |
inflexion
The inflexion of this word. |
protected static java.util.Collection |
NO_HOMONYM
Constant for the empty homonyms collection. |
protected DictEntry |
root
The root of this entry. |
protected java.lang.String |
word
The word of this entry. |
| Constructor Summary | |
DictEntry(java.lang.String word)
Create a DictEntry for the word. |
|
DictEntry(java.lang.String word,
AffixFlags flags)
Create a DictEntry for word with flags |
|
DictEntry(java.lang.String word,
char[] flagCharacters)
Create a DictEntry for word with flags specified by
flagCharacters. |
|
DictEntry(java.lang.String word,
DictEntry root)
Create a DictEntry for the word with root. |
|
DictEntry(java.lang.String word,
DictEntry root,
AffixFlags flags)
Create a DictEntry for word with flags |
|
| Method Summary | |
boolean |
addHomonym(DictEntry h)
Add homonym h if the addition doesn't result
a cyclic reference via homonyms. |
boolean |
admitCapitalization(java.lang.String word)
Return if the capitalization of this entry admits word. |
boolean |
admitLowerCapitalization(java.lang.String word)
Return if the capitalization of this entry admits word with
first character upper case. |
static byte |
capitalization(java.lang.String word)
Return the capitalization type of word. |
boolean |
compound()
Tells if this entry represents a compound word. |
java.lang.String |
contentString()
Return the internal String representation of the content
of this entry. |
java.lang.String |
derivatorString()
|
boolean |
derived()
Tells if this entry represents a derived word. |
java.lang.String |
dictionaryDerivatorString()
Return the derivator string showing how this entry is derived from the its dictionary root. |
boolean |
dictionaryWord()
Tells if this entry has been read from the dictionary. |
DictEntry |
getAbsoluteRootEntry()
Return the absolute root of this entry, the one at the bottom of the derivational chain. |
java.lang.String |
getAbsoluteRootWord()
Return the absolute root of this entry, the one at the bottom of the derivational chain. |
AffixFlags |
getAccumulatedFlags()
Accumulated flags stands for synthetizing multiple derivations using the affix rules of hunmorph RC1-2. |
byte |
getCapitalization()
Return capitalization of the word of this entry. |
java.lang.String |
getCaseEnding()
Return the case ending string of this entry. |
DictEntry |
getDictionaryRootEntry()
Return the dictionary stem of word. |
java.lang.String |
getDictionaryRootWord()
Return the dictionary stem of word. |
AffixFlags |
getFlags()
Return flags |
java.lang.String |
getFlagString()
Return the String representation of the affix flags |
java.util.Collection |
getHomonyms()
Return collection of homonyms. |
DictEntryExtension |
getInflexion()
Return inflexion. |
java.lang.String |
getPOS()
Return the part-of-speech string of this entry as told by inflexion. |
DictEntry |
getRelativeRootEntry()
Return the relative root, the root at the end of derivational chain of this entry. |
java.lang.String |
getRelativeRootWord()
Return the word of the absolute root returned by
getRelativeRootEntry(). |
DictEntry |
getRootEntry()
Return the root of this entry or null. |
java.lang.String |
getRootWord()
Return the root word of this entry regardless if the root is inflexed. |
java.lang.String |
getWord()
Return word of this entry. |
boolean |
hasFlag(AffixEntry entry)
Return if flags contains the flag of entry. |
boolean |
hasFlag(int flag)
Return if flags contains flag |
java.lang.String |
inflex(AffixEntry affix)
Return the inflexed word resulted by applying affix to the
word of this entry. |
java.lang.String |
inflex(PrefixEntry prefix,
SuffixEntry suffix)
Return the inflexed word resulted by applying prefix and
suffix to the word of this entry. |
boolean |
inflexed()
Return if this entry is an inflexed form of root. |
java.lang.String |
inflexionString()
|
int |
length()
Return the number of components of this entry. |
java.lang.String |
longContentString()
Return the internal String representation of the content
of this entry. |
java.lang.String |
morphString()
|
void |
setInflexion(DictEntryExtension inflexion)
Set inflexion. |
boolean |
setRoot(DictEntry entry)
Set the root of this word if setting doesn't result a cyclic reference via roots. |
protected java.lang.String |
shortClassName()
|
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 |
public static final byte ALL_LOWER
public static final byte CAPITALIZED
public static final byte ALL_CAPITALIZED
public static final byte FUNNY_CAPITALIZED
public static final java.lang.String[] CAPS
protected static final java.util.Collection NO_HOMONYM
protected AffixFlags flags
protected java.lang.String word
protected byte capitalization
protected DictEntry root
protected java.util.Collection homonyms
protected DictEntryExtension inflexion
| Constructor Detail |
public DictEntry(java.lang.String word)
word.
word - the word
java.lang.IllegalArgumentException - if the word is null
public DictEntry(java.lang.String word,
DictEntry root)
word with root.
word - the wordroot - the root of the created entry
java.lang.IllegalArgumentException - if the word is null
public DictEntry(java.lang.String word,
char[] flagCharacters)
word with flags specified by
flagCharacters.
word - the wordflagCharacters - the affix flags
java.lang.IllegalArgumentException - if the word is null
public DictEntry(java.lang.String word,
AffixFlags flags)
word with flags.
- Parameters:
word - the wordflags - the affix flags
- Throws:
java.lang.IllegalArgumentException - if the word is null
public DictEntry(java.lang.String word,
DictEntry root,
AffixFlags flags)
word with flags
and with root.
- Parameters:
word - the wordflags - the affix flagsroot - the root of the created entry
- Throws:
java.lang.IllegalArgumentException - if the word is null| Method Detail |
public java.lang.String getWord()
word of this entry.
public byte getCapitalization()
capitalization of the word of this entry.
capitalizationpublic java.util.Collection getHomonyms()
public AffixFlags getFlags()
flags
public java.lang.String getFlagString()
String representation of the affix flags
public AffixFlags getAccumulatedFlags()
public DictEntryExtension getInflexion()
inflexion.
inflexionpublic int length()
public boolean compound()
false. Extensions representing compound words should
override this method to return true.
public boolean dictionaryWord()
false.
public boolean derived()
public boolean inflexed()
root.
public java.lang.String getPOS()
inflexion.
public java.lang.String getCaseEnding()
null. Extensions should override this method.
public DictEntry getRootEntry()
root of this entry or null.
public java.lang.String getRootWord()
public DictEntry getAbsoluteRootEntry()
public java.lang.String getAbsoluteRootWord()
public DictEntry getRelativeRootEntry()
public java.lang.String getRelativeRootWord()
word of the absolute root returned by
getRelativeRootEntry().
public DictEntry getDictionaryRootEntry()
word.
Return getRelativeRootWord() if this entry has been read from a
dictionary or root is null.
Return dictionary stem of root otherwise.
public java.lang.String getDictionaryRootWord()
word.
Return getRelativeRootWord() if this entry has been read from a
dictionary or root is null.
Return dictionary stem of root otherwise.
public void setInflexion(DictEntryExtension inflexion)
inflexion.
inflexion - the inflexion to setpublic java.lang.String inflex(AffixEntry affix)
affix to the
word of this entry.
affix - the affix
public java.lang.String inflex(PrefixEntry prefix,
SuffixEntry suffix)
prefix and
suffix to the word of this entry.
prefix - the prefix inflexionsuffix - the suffix inflexion
public boolean admitCapitalization(java.lang.String word)
word.
Note that admitCaptialization does not check if
word equals to the word of this entry!
word - the word to admit
wordpublic boolean admitLowerCapitalization(java.lang.String word)
word with
first character upper case.
Note that admitCaptialization does not check if
word equals to the word of this entry!
word - the word to admit
wordpublic boolean hasFlag(int flag)
flags contains flag
flag - the flag to check
flags contains flagpublic boolean hasFlag(AffixEntry entry)
flags contains the flag of entry.
The implementation of this method tells if flags contains
the flag of entry.
entry - the affix entry to check
flags contains the flag of entrypublic boolean setRoot(DictEntry entry)
entry - the root of this word.
root has been setpublic final boolean addHomonym(DictEntry h)
h if the addition doesn't result
a cyclic reference via homonyms.
h - the homonym to add.
h has been addedpublic java.lang.String morphString()
public java.lang.String derivatorString()
public java.lang.String inflexionString()
public java.lang.String dictionaryDerivatorString()
public java.lang.String longContentString()
String representation of the content
of this entry.
String representation of the of content of this
entrypublic java.lang.String contentString()
String representation of the content
of this entry.
String representation of the of content of this
entrypublic java.lang.String toLongString()
public java.lang.String toString()
protected java.lang.String shortClassName()
public static byte capitalization(java.lang.String word)
word.
The returned value is one of ALL_LOWER, CAPITALIZED,
ALL_CAPITALIZED and FUNNY_CAPITALIZED.
word - the word the capitalization of which is to be determined
word.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||