public class PartOfSpeech
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable
This is a base class for parts of speech.
.All part of speech entries have the following attributes:
The general tag name allows reference to a few important tags in a tag set independent fashion. General tag names are defined as follows.
General tag name | Meaning | ||
---|---|---|---|
noun-singular | Tag for a singular noun. | ||
noun-plural | Tag for a plural noun. | noun-proper-singular | Tag for a singular proper noun. |
noun-proper-plural | Tag for a plural proper noun. | ||
numeral-cardinal | Tag for a cardinal number. |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
description
Description.
|
protected java.lang.String |
generalTagName
General tag name.
|
protected java.lang.String |
lemmaWordClass
Lemma word class.
|
protected java.lang.String |
majorWordClass
Major word class.
|
protected java.lang.String |
tag
Tag.
|
protected java.lang.String |
wordClass
Word class.
|
Constructor and Description |
---|
PartOfSpeech()
Creates a new part of speech.
|
PartOfSpeech(java.lang.String tag,
java.lang.String wordClass,
java.lang.String majorWordClass,
java.lang.String lemmaWordClass,
java.lang.String generalTagName,
java.lang.String description)
Creates a new part of speech.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object object)
Compare this object to another.
|
boolean |
equals(java.lang.Object obj)
Returns true if some other object is equal to this one.
|
java.lang.String |
getDescription()
Gets the description.
|
java.lang.String |
getGeneralTagName()
Gets the general tag name.
|
java.lang.String |
getLemmaWordClass()
Gets the lemma word class.
|
java.lang.String |
getMajorWordClass()
Gets the major word class.
|
java.lang.String |
getTag()
Gets the tag.
|
java.lang.String |
getWordClass()
Gets the word class.
|
int |
hashCode()
Returns a hash code for the object.
|
void |
setDescription(java.lang.String description)
Sets the description.
|
void |
setGeneralTagName(java.lang.String generalTagName)
Sets the general tag name.
|
void |
setLemmaWordClass(java.lang.String lemmaWordClass)
Sets the lemma word class.
|
void |
setMajorWordClass(java.lang.String majorWordClass)
Sets the major word class.
|
void |
setTag(java.lang.String tag)
Sets the tag.
|
void |
setWordClass(java.lang.String wordClass)
Sets the word class.
|
java.lang.String |
toString()
Gets a string representation of the part of speech.
|
protected java.lang.String tag
protected java.lang.String wordClass
protected java.lang.String majorWordClass
protected java.lang.String generalTagName
protected java.lang.String description
protected java.lang.String lemmaWordClass
public PartOfSpeech()
public PartOfSpeech(java.lang.String tag, java.lang.String wordClass, java.lang.String majorWordClass, java.lang.String lemmaWordClass, java.lang.String generalTagName, java.lang.String description)
tag
- Tag name.wordClass
- The word class.majorWordClass
- The major word class.lemmaWordClass
- The lemma word class.generalTagName
- The general tag name.description
- The description.public java.lang.String getTag()
public void setTag(java.lang.String tag)
tag
- The tag.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- Description. May be empty.public java.lang.String getWordClass()
public void setWordClass(java.lang.String wordClass)
wordClass
- The word class.public java.lang.String getMajorWordClass()
public void setMajorWordClass(java.lang.String majorWordClass)
majorWordClass
- The major word class.public java.lang.String getGeneralTagName()
public void setGeneralTagName(java.lang.String generalTagName)
generalTagName
- The general tag name.public java.lang.String getLemmaWordClass()
public void setLemmaWordClass(java.lang.String lemmaWordClass)
lemmaWordClass
- The lemma word class.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
The two parts of speech are equal if their classes and tags are equal.
equals
in class java.lang.Object
obj
- The other object.public int compareTo(java.lang.Object object)
compareTo
in interface java.lang.Comparable
object
- Other object.
We only compare the tags.
public int hashCode()
hashCode
in class java.lang.Object