|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgermanet.LexUnit
public class LexUnit
A LexUnit consists of one or more
orthForms (represented as a List of Strings), and has the following
attributes: markedStyle (boolean), sense (int), orthVar (boolean),
artificial (boolean), properName (boolean), status (String), and
word class (WordClass).
A LexUnit also has the lexical relations:
LexRel.antonymy, LexRel.synonymy,
LexRel.pertonymy,
LexRel.participleOf,
LexRel.arg1, LexRel.arg1_pred,
LexRel.arg2, LexRel.arg2_pred
Methods are provided to get each of the attributes.
The orthographic forms can be retrieved:
List<String> forms = aLexUnit.getOrthForms();
Lexical relations can be retrieved:
List<LexUnit> antonyms = aLexUnit.getRelations(LexRel.antonymy);
Neighbors (all LexUnits that are related to this one) can be retrieved:
List<LexUnit> neighbors = aLexUnit.getRelations();
Unless otherwise stated, methods will return an empty List rather than null
to indicate that no objects exist for the given request.
Method Summary | |
---|---|
java.lang.String |
getID()
Returns the unique identifier of this LexUnit. |
java.lang.String |
getOrthForm(int i)
Return the ith orth form of this LexUnit |
java.util.List<java.lang.String> |
getOrthForms()
Returns a List of this LexUnit's orthForms. |
Synset |
getParentSynset()
Returns the Synset to which this LexUnit belongs. |
java.util.List<LexUnit> |
getRelations()
Return a List of all of the LexUnits that this LexUnit has any relation to. |
java.util.List<LexUnit> |
getRelations(LexRel type)
Return a List of LexUnits that have the relation type to this LexUnit. |
WordClass |
getWordClass()
Return the word class of this LexUnit. |
int |
getWordSense()
Return the sense number of this LexUnit. |
boolean |
inWordClass(WordClass wordClass)
Return true if this LexUnit is in wordClass. |
boolean |
isArtificial()
Return true if the artificial attribute is set, false otherwise. |
boolean |
isMarkedStyle()
Return true if the marked style attribute is set, false otherwise. |
boolean |
isOrthVar()
Return true if the orthographic variant is set, false otherwise. |
boolean |
isProperName()
Return true if the proper name attribute is set, false otherwise. |
int |
numOrthForms()
Return the number of orth forms in this LexUnit. |
java.lang.String |
toString()
Return a String representation of this LexUnit (orthForms only). |
java.lang.String |
xmlString()
Return an xml String representation of this LexUnit. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public int numOrthForms()
public Synset getParentSynset()
public int getWordSense()
public java.lang.String getID()
public boolean isMarkedStyle()
public boolean isOrthVar()
public boolean isArtificial()
public boolean isProperName()
public java.util.List<java.lang.String> getOrthForms()
public java.lang.String getOrthForm(int i)
i
-
public WordClass getWordClass()
public boolean inWordClass(WordClass wordClass)
wordClass
- the word class (eg. WordClass.adj)
public java.util.List<LexUnit> getRelations(LexRel type)
type
- type of relation to retrieve.
public java.util.List<LexUnit> getRelations()
public java.lang.String xmlString()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |