org.eml.sir.gn
Class WordSense

java.lang.Object
  extended byorg.eml.sir.gn.WordSense
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class WordSense
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

Class representing a word sense.

Version:
0.2
Author:
Hendrik Niederlich (EML-R)
See Also:
Serialized Form

Constructor Summary
WordSense()
          Create a new instance of WordSense.
 
Method Summary
 boolean addAntonym(WordSense antonym)
          Add one antonym to the antonym's list of this WordSense.
 int compareTo(java.lang.Object otherWordSense)
          Return a number representing the difference between this and an other word sense.
 boolean equals(java.lang.Object otherWordSense)
          Return wether this WordSense is the same as the other one.
 java.util.ArrayList getAntonyms()
          Get all antonyms of this WordSense.
 boolean getArtificial()
          Indicates wether this WordSense is an artificial concept, not corresponding to natural word.
 java.lang.String getGrapheme()
          Get graphemic represantation of this WordSense.
 WordSense getParticipleOf()
          Get the WordSense of the verb that this WordSense is participle of.
 char getPartOfSpeech()
          Get the part of speech of this WordSense.
 WordSense getPertonym()
          Get the WordSense that this WordSense is derived from.
 boolean getProperName()
          Indicates wether this WordSense is a proper name.
 int getSense()
          Get sense of this WordSense.
 boolean getStyle()
          Indicates wether this WordSense stands out stylistically.
 Synset getSynset()
          Get corresponding Synset.
 void setAntonyms(java.util.ArrayList antonyms)
          Set all antonyms of this WordSense.
 void setArtificial(boolean artificial)
          Set wether this WordSense is an artificial concept.
 void setGrapheme(java.lang.String grapheme)
          Set graphemic represantation of this WordSense.
 void setParticipleOf(WordSense participleOf)
          Set the WordSense of the verb that this WordSense is participle of.
 void setPartOfSpeech(char pos)
          Set the part of speech of this WordSense.
 void setPertonym(WordSense pertonym)
          Set the WordSense that this WordSense is derived from.
 void setProperName(boolean properName)
          Set wether this WordSense is a proper name.
 void setSense(int sense)
          Set sense of this WordSense.
 void setStyle(boolean style)
          Set wether this WordSense stands out stylistically.
 void setSynset(Synset synset)
          Set Synset this Wordsense depends on.
 java.lang.String toString()
          Return a string representation of this WordSense instance.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WordSense

public WordSense()
Create a new instance of WordSense.

Method Detail

getGrapheme

public java.lang.String getGrapheme()
Get graphemic represantation of this WordSense.


setGrapheme

public void setGrapheme(java.lang.String grapheme)
Set graphemic represantation of this WordSense.


getSense

public int getSense()
Get sense of this WordSense. The sense is a positive integer number.


setSense

public void setSense(int sense)
Set sense of this WordSense. The sense is a positive integer number.


getArtificial

public boolean getArtificial()
Indicates wether this WordSense is an artificial concept, not corresponding to natural word.


setArtificial

public void setArtificial(boolean artificial)
Set wether this WordSense is an artificial concept.


getProperName

public boolean getProperName()
Indicates wether this WordSense is a proper name.


setProperName

public void setProperName(boolean properName)
Set wether this WordSense is a proper name.


getStyle

public boolean getStyle()
Indicates wether this WordSense stands out stylistically.


setStyle

public void setStyle(boolean style)
Set wether this WordSense stands out stylistically.


getSynset

public Synset getSynset()
Get corresponding Synset. Every WordSense depends on exactly one Synset.

Returns:
Synset or null if no Synset exists.

setSynset

public void setSynset(Synset synset)
Set Synset this Wordsense depends on.


getAntonyms

public java.util.ArrayList getAntonyms()
Get all antonyms of this WordSense.

Returns:
All antonyms of this WordSense in an ArrayList of one or more WordSenses. Or null if no antonym exists.

setAntonyms

public void setAntonyms(java.util.ArrayList antonyms)
Set all antonyms of this WordSense.

Parameters:
antonyms - The new antonyms of this WordSense. It is an ArrayList of one or more WordSenses.

addAntonym

public boolean addAntonym(WordSense antonym)
Add one antonym to the antonym's list of this WordSense.

Parameters:
antonym - A new antonym of this WordSense.

getPertonym

public WordSense getPertonym()
Get the WordSense that this WordSense is derived from.

Returns:
WordSense or null if no pertonym exists.

setPertonym

public void setPertonym(WordSense pertonym)
Set the WordSense that this WordSense is derived from.


getParticipleOf

public WordSense getParticipleOf()
Get the WordSense of the verb that this WordSense is participle of.

Returns:
WordSense or null if there is no other WordSense that this WordSense is partciple of.

setParticipleOf

public void setParticipleOf(WordSense participleOf)
Set the WordSense of the verb that this WordSense is participle of.


getPartOfSpeech

public char getPartOfSpeech()
Get the part of speech of this WordSense.


setPartOfSpeech

public void setPartOfSpeech(char pos)
Set the part of speech of this WordSense.


equals

public boolean equals(java.lang.Object otherWordSense)
Return wether this WordSense is the same as the other one. Only true if the WordSenses have the same grpahemic represantation and the same sense number.


toString

public java.lang.String toString()
Return a string representation of this WordSense instance. This String is an unique key to its WordSense.


compareTo

public int compareTo(java.lang.Object otherWordSense)
Return a number representing the difference between this and an other word sense.

Specified by:
compareTo in interface java.lang.Comparable