|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.mit.jwi.item.Synset
public class Synset
Default implementation of the ISynset interface.
| Constructor Summary | |
|---|---|
Synset(ISynsetID id,
ILexFile lexFile,
boolean isAdjSat,
boolean isAdjHead,
java.lang.String gloss,
java.util.List<IWord> words,
java.util.Map<IPointer,? extends java.util.List<ISynsetID>> ids)
|
|
| Method Summary | |
|---|---|
static void |
checkOffset(int offset)
|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getGloss()
The gloss (brief, plain-English description) of this synset. |
ISynsetID |
getID()
Returns the ID object. |
ILexFile |
getLexicalFile()
Returns a representation of the lexical file. |
int |
getOffset()
Returns the data file offset of this synset, per the Wordnet specification. |
POS |
getPOS()
Returns which part of speech this object pertains to. |
java.util.Map<IPointer,java.util.List<ISynsetID>> |
getRelatedMap()
Returns an immutable map from pointers to immutable lists of synsets Note that this only returns a non-empty result for semantic pointers (i.e., non-lexical pointers). |
java.util.List<ISynsetID> |
getRelatedSynsets()
Returns an immutable list of synset ids for all synsets that are connected by pointers to this synset. |
java.util.List<ISynsetID> |
getRelatedSynsets(IPointer type)
Returns an immutable list of the ids of all synsets that are related to this synset by the specified pointer type. |
int |
getType()
Returns the type of the synset, encoded as follows: 1=Noun, 2=Verb, 3=Adjective, 4=Adverb, 5=Adjective Satellite. |
IWord |
getWord(int wordNumber)
Returns the word with the specified word number. |
java.util.List<IWord> |
getWords()
Returns an immutable list of the word objects (synset, index word pairs) associated with this synset. |
int |
hashCode()
|
boolean |
isAdjectiveHead()
Returns whether this synset is an adjective head or not, per Wordnet specification. |
boolean |
isAdjectiveSatellite()
Returns whether this synset is an adjective satellite or not, per Wordnet specification. |
static boolean |
isIllegalOffset(int offset)
|
java.lang.String |
toString()
|
static java.lang.String |
zeroFillOffset(int offset)
Takes an integer in the closed range [0,99999999] and converts it into an eight decimal digit zero-filled string. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Synset(ISynsetID id,
ILexFile lexFile,
boolean isAdjSat,
boolean isAdjHead,
java.lang.String gloss,
java.util.List<IWord> words,
java.util.Map<IPointer,? extends java.util.List<ISynsetID>> ids)
java.lang.NullPointerException - if any argument is null| Method Detail |
|---|
public ISynsetID getID()
IItem
getID in interface IItem<ISynsetID>public int getOffset()
ISynset
getOffset in interface ISynsetpublic POS getPOS()
IHasPOSnull, if the object is not specific to any particular
part of speech.
getPOS in interface IHasPOSpublic int getType()
ISynset
getType in interface ISynsetpublic java.lang.String getGloss()
ISynset
getGloss in interface ISynsetpublic java.util.List<IWord> getWords()
ISynset
getWords in interface ISynsetpublic IWord getWord(int wordNumber)
ISynset
getWord in interface ISynsetpublic java.util.Map<IPointer,java.util.List<ISynsetID>> getRelatedMap()
ISynsetIWord.getRelatedMap() on the appropriate object.
getRelatedMap in interface ISynsetpublic java.util.List<ISynsetID> getRelatedSynsets(IPointer type)
ISynsetIWord.getRelatedWords()() on the
appropriate object.
getRelatedSynsets in interface ISynsetpublic java.util.List<ISynsetID> getRelatedSynsets()
ISynsetIWord objects.
getRelatedSynsets in interface ISynsetpublic boolean isAdjectiveSatellite()
ISynset
isAdjectiveSatellite in interface ISynsetpublic boolean isAdjectiveHead()
ISynset
isAdjectiveHead in interface ISynsetpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic ILexFile getLexicalFile()
ISynset
getLexicalFile in interface ISynsetpublic static java.lang.String zeroFillOffset(int offset)
public static void checkOffset(int offset)
public static boolean isIllegalOffset(int offset)
true if the specified offset is in the closed
range [0, 99999999]; false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||