|
Fido Alpha 3.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fido.db.LanguageMorphologyTable
See Morphology for a description on morphology tags.
Constructor Summary | |
LanguageMorphologyTable()
|
Method Summary | |
void |
add(java.lang.String language,
java.lang.String tag,
java.lang.String root,
java.lang.String surface)
Adds a new Morphology rule to a given language. |
void |
delete(java.lang.String language,
java.lang.String tag,
int row)
Removes the rule from the specified table located at row row number. |
java.lang.String |
generate(java.lang.String language,
java.lang.String tag,
java.lang.String str)
Generates a surface form from the first root form that matches the str within the MorphologyTag Morphology tag group. |
int |
hashCode(java.lang.String language,
java.lang.String tag,
java.lang.String rank)
|
java.util.Collection |
list()
Returns a dump of all Morphology rules for a language, suitable for display in a table. |
java.util.Collection |
listLanguages()
|
java.util.Collection |
listTags()
Returns the names of all MorphologyType entries in the list. |
void |
modify(java.lang.String language,
java.lang.String tag,
int rank,
java.lang.String root,
java.lang.String surface)
|
void |
moveRuleDown(java.lang.String language,
java.lang.String tag,
int row)
Moves the rules located at row down in priority. |
void |
moveRuleUp(java.lang.String language,
java.lang.String tag,
int row)
Moves the rules located at row up in priority. |
java.util.Collection |
recognize(java.lang.String language,
java.lang.String str)
Returns a list of base forms that could be derived from applying any rule for the language. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LanguageMorphologyTable()
Method Detail |
public void add(java.lang.String language, java.lang.String tag, java.lang.String root, java.lang.String surface) throws FidoDatabaseException, MorphologyTagNotFoundException
Root Form | Surface Form | Morphology Type |
---|---|---|
child | children | plural |
deer | deer | plural |
*ch | *ches | plural |
* | *s | plural |
When addRule()
is called with the rule
Root Form | Surface Form | Morphology Type |
---|---|---|
goose | geese | plural |
When addRule()
is called with the rule
Root Form | Surface Form | Morphology Type |
---|---|---|
*x | *xes | plural |
Root Form | Surface Form | Morphology Type |
---|---|---|
goose | geese | plural |
child | children | plural |
deer | deer | plural |
*x | *xes | plural |
*ch | *ches | plural |
* | *s | plural |
surface
- root
-
MorphologyTypeNotFoundException
- thrown if the string type
does not match a MorphologyType in the MorphologyTypeList.
java.sql.SQLException
- Input / Output error saving Morphology
FidoDatabaseException
MorphologyTagNotFoundException
public void modify(java.lang.String language, java.lang.String tag, int rank, java.lang.String root, java.lang.String surface) throws FidoDatabaseException
FidoDatabaseException
public void delete(java.lang.String language, java.lang.String tag, int row) throws FidoDatabaseException
language
- name of language tablerow
- row number to remove
FidoDatabaseException
- Input / Output error saving Morphologypublic void moveRuleUp(java.lang.String language, java.lang.String tag, int row) throws FidoDatabaseException
language
- name of the languagerow
- row indicator to move up
FidoDatabaseException
- Input / Output error saving Morphologypublic void moveRuleDown(java.lang.String language, java.lang.String tag, int row) throws FidoDatabaseException
language
- name of the languagerow
- row indicator to move down
FidoDatabaseException
- Input / Output error saving Morphologypublic java.util.Collection list() throws FidoDatabaseException
index 0: row number, starting at 0 index 1: root form index 2: surface form index 3: morphology type (such as plural) index 4: boolean string if the rule is used in recognition (true or false as a string)
FidoDatabaseException
public java.util.Collection listLanguages() throws FidoDatabaseException
FidoDatabaseException
public java.util.Collection recognize(java.lang.String language, java.lang.String str) throws FidoDatabaseException
Root Form | Surface Form | Morphology Type |
---|---|---|
child | children | plural |
deer | deer | plural |
*ch | *ches | plural |
* | *s | plural |
*s | *ses | verb 3rd person singular |
* | *s | verb 3rd person singular |
language
- language to usestr
- String to recognize base forms from
FidoDatabaseException
MorphologyRecognizeMatch
public java.lang.String generate(java.lang.String language, java.lang.String tag, java.lang.String str) throws FidoDatabaseException
Root Form | Surface Form | Morphology Tag |
---|---|---|
child | children | plural |
deer | deer | plural |
*ch | *ches | plural |
* | *s | plural |
str
- String to generate a surface form fortag
- Morphology tag group to use
FidoDatabaseException
public java.util.Collection listTags() throws FidoDatabaseException
FidoDatabaseException
public int hashCode(java.lang.String language, java.lang.String tag, java.lang.String rank) throws FidoDatabaseException, MorphologyNotFoundException
FidoDatabaseException
MorphologyNotFoundException
|
Fido Alpha 3.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |