edu.mit.jwi.item
Interface ISynset

All Superinterfaces:
IHasPOS, IItem<ISynsetID>, java.io.Serializable
All Known Implementing Classes:
Synset

public interface ISynset
extends IHasPOS, IItem<ISynsetID>

Represents a synset.

Since:
JWI 1.0
Version:
2.4.0, Nov. 16, 2007
Author:
Mark A. Finlayson

Method Summary
 java.lang.String getGloss()
          Returns the gloss (brief, plain-English description) of this synset.
 ILexFile getLexicalFile()
          Returns a description of the lexical file.
 int getOffset()
          Returns the data file byte offset of this synset.
 java.util.Map<IPointer,java.util.List<ISynsetID>> getRelatedMap()
          Returns an immutable map from semantic pointers to immutable lists of synsets.
 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 ptr)
          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.
 boolean isAdjectiveHead()
          Returns true if this synset is an adjective head; false otherwise.
 boolean isAdjectiveSatellite()
          Returns true if this synset is an adjective satellite; false otherwise.
 
Methods inherited from interface edu.mit.jwi.item.IHasPOS
getPOS
 
Methods inherited from interface edu.mit.jwi.item.IItem
getID
 

Method Detail

getOffset

int getOffset()
Returns the data file byte offset of this synset.

Returns:
int the offset in the associated data source
Since:
JWI 1.0

getLexicalFile

ILexFile getLexicalFile()
Returns a description of the lexical file. In wordnet data files, the lexical file number is a two digit decimal integer representing the name of the lexicographer file containing the synset for the sense.

Returns:
the lexical file object that describes the lexical file in which this synset is stored
Since:
JWI 2.1.0

getType

int getType()
Returns the type of the synset, encoded as follows: 1=Noun, 2=Verb, 3=Adjective, 4=Adverb, 5=Adjective Satellite.

Returns:
the type of the synset, an integer between 1 and 5, inclusive
Since:
JWI 1.0

getGloss

java.lang.String getGloss()
Returns the gloss (brief, plain-English description) of this synset.

Returns:
String Returns the non-null, non-empty gloss.
Since:
JWI 1.0

getWords

java.util.List<IWord> getWords()
Returns an immutable list of the word objects (synset, index word pairs) associated with this synset.

Returns:
a non-null, immutable list of words for this synset
Since:
JWI 2.0.0

getWord

IWord getWord(int wordNumber)
Returns the word with the specified word number. Words are numbered sequentially from 1 up to, and including, 255.

Parameters:
wordNumber - the number of the word to be retrieved
Returns:
the word with the specified word number
Throws:
java.lang.IndexOutOfBoundsException - if the word number is not an appropriate word number for this synset.
Since:
JWI 2.1.2

isAdjectiveHead

boolean isAdjectiveHead()
Returns true if this synset is an adjective head; false otherwise.

Returns:
true if this synset represents an adjective head; false otherwise.
Since:
JWI 1.0

isAdjectiveSatellite

boolean isAdjectiveSatellite()
Returns true if this synset is an adjective satellite; false otherwise.

Returns:
true if this synset represents an adjective satellite; false otherwise.
Since:
JWI 1.0

getRelatedMap

java.util.Map<IPointer,java.util.List<ISynsetID>> getRelatedMap()
Returns an immutable map from semantic pointers to immutable lists of synsets. Note that this only returns synsets related by semantic pointers (i.e., non-lexical pointers). To obtain lexical pointers, call IWord.getRelatedMap() on the appropriate word.

Returns:
a non-null, unmodifiable map from pointers to synsets
Since:
JWI 2.0.0

getRelatedSynsets

java.util.List<ISynsetID> getRelatedSynsets(IPointer ptr)
Returns an immutable list of the ids of all synsets that are related to this synset by the specified pointer type. Note that this only returns a non-empty result for semantic pointers (i.e., non-lexical pointers). To obtain lexical pointers, call IWord.getRelatedWords()() on the appropriate object.

If there are no such synsets, this method returns the empty list.

Parameters:
ptr - the pointer for which related synsets are to be retrieved.
Returns:
the list of synsets related by the specified pointer; if there are no such synsets, returns the empty list
Since:
JWI 2.0.0

getRelatedSynsets

java.util.List<ISynsetID> getRelatedSynsets()
Returns an immutable list of synset ids for all synsets that are connected by pointers to this synset. Note that the related synsets returned by this call are related by semantic pointers (as opposed to lexical pointers, which are relationships between IWord objects.

Returns:
a list of all synsets semantically related to the current synset
Since:
JWI 2.0.0


Copyright © 2007-2013 Massachusetts Institute of Technology. All Rights Reserved.