edu.mit.jwi.item
Interface IWord

All Superinterfaces:
IHasPOS, IItem<IWordID>, java.io.Serializable
All Known Implementing Classes:
Word

public interface IWord
extends IHasPOS, IItem<IWordID>

A word, which in Wordnet is an index word paired with a synset.

Since:
JWI 1.0
Version:
2.4.0
Author:
Mark A. Finlayson

Method Summary
 AdjMarker getAdjectiveMarker()
          Returns the adjective marker of this word.
 java.lang.String getLemma()
          Returns the root form of this word, never null or empty.
 int getLexicalID()
          A integer in the closed range [0,15] that, when appended onto lemma, uniquely identifies a sense within a lexicographer file.
 java.util.Map<IPointer,java.util.List<IWordID>> getRelatedMap()
          Returns an immutable map of from pointers to immutable maps.
 java.util.List<IWordID> getRelatedWords()
          Returns an immutable list of all word ids related to this word by pointers in the database.
 java.util.List<IWordID> getRelatedWords(IPointer ptr)
          Returns an immutable list of all word ids related to this word by the specified pointer type.
 ISenseKey getSenseKey()
          Returns the sense key for this word.
 ISynset getSynset()
          Returns the synset uniquely identified by this word.
 java.util.List<IVerbFrame> getVerbFrames()
          Returns an immutable list of all verb frames associated with this word.
 
Methods inherited from interface edu.mit.jwi.item.IHasPOS
getPOS
 
Methods inherited from interface edu.mit.jwi.item.IItem
getID
 

Method Detail

getLemma

java.lang.String getLemma()
Returns the root form of this word, never null or empty.

Returns:
the non-null, non-empty root form of this word
Since:
JWI 1.0

getSynset

ISynset getSynset()
Returns the synset uniquely identified by this word. The returned synset will never be null.

Returns:
the non-null synset identified by this word.
Since:
JWI 2.1.0

getSenseKey

ISenseKey getSenseKey()
Returns the sense key for this word. Will never return null; however, the sense key that is returned may not yet have it's head lemma and head lexical id set yet, and so may throw an exception on some calls.

Returns:
the sense key for this word, never null
Since:
JWI 2.1.0
See Also:
ISenseKey.needsHeadSet(), ISenseKey.setHead(String, int)

getLexicalID

int getLexicalID()
A integer in the closed range [0,15] that, when appended onto lemma, uniquely identifies a sense within a lexicographer file. Lexical id numbers usually start with 0, and are incremented as additional senses of the word are added to the same file, although there is no requirement that the numbers be consecutive or begin with 0. Note that a value of 0 is the default, and therefore is not present in lexicographer files. In the wordnet data files the lexical id is represented as a one digit hexadecimal integer.

Returns:
the lexical id of the word, an integer between 0 and 15, inclusive
Since:
JWI 1.0

getRelatedMap

java.util.Map<IPointer,java.util.List<IWordID>> getRelatedMap()
Returns an immutable map of from pointers to immutable maps. Note that this only returns IWords related by lexical pointers (i.e., not semantic pointers). To retrieve items related by semantic pointers, call ISynset.getRelatedMap() on the appropriate object.

Returns:
an immutable map from lexical pointers to words
Since:
JWI 2.0.0

getRelatedWords

java.util.List<IWordID> getRelatedWords(IPointer ptr)
Returns an immutable list of all word ids related to this word by the specified pointer type. Note that this only returns words related by lexical pointers (i.e., not semantic pointers). To retrieve items related by semantic pointers, call ISynset.getRelatedSynsets(). If this word has no targets for the for the specified pointer, this method returns an empty list. This method never returns null.

Parameters:
ptr - the pointer for which related words are requested
Returns:
the list of words related by the specified pointer, or an empty list if none.
Since:
JWI 2.0.0

getRelatedWords

java.util.List<IWordID> getRelatedWords()
Returns an immutable list of all word ids related to this word by pointers in the database. Note this only returns words related to this word by lexical pointers, i.e., not semantic pointers. To retrieve synsets related to the synset for this word by semantic pointers, call ISynset.getRelatedSynsets() on the ISynset for this word.

Returns:
an immutable list of all lexically-related words
Since:
JWI 2.0.0

getVerbFrames

java.util.List<IVerbFrame> getVerbFrames()
Returns an immutable list of all verb frames associated with this word. If there are no such frames, returns the empty list.

Returns:
an immutable list of all the verb frames associated with this word, or the empty list if none.
Since:
JWI 2.0.0

getAdjectiveMarker

AdjMarker getAdjectiveMarker()
Returns the adjective marker of this word. If this word has no adjective marker, returns null

Returns:
the adjective marker for this word, or null if none.
Since:
JWI 2.1.0


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