public class IndexWordID extends Object implements IIndexWordID
IIndexWordID.| Modifier and Type | Field and Description |
|---|---|
protected static Pattern |
whitespace
Whitespace pattern for use in replacing whitespace with underscores
|
| Constructor and Description |
|---|
IndexWordID(String lemma,
POS pos)
Constructs an index word id object with the specified lemma and part of
speech.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getLemma()
Returns the lemma (root form) of the index word that this ID indicates.
|
POS |
getPOS()
Returns the associated part of speech for this object.
|
int |
hashCode() |
static IndexWordID |
parseIndexWordID(String value)
Convenience method for transforming the result of the
toString()
method into an IndexWordID |
String |
toString() |
protected static final Pattern whitespace
public IndexWordID(String lemma, POS pos)
lemma - the lemma for the idpos - the part of speech for the idNullPointerException - if either argument is nullIllegalArgumentException - if the lemma is empty or all whitespacepublic String getLemma()
IIndexWordIDnull, empty, or all whitespace.getLemma in interface IIndexWordIDpublic POS getPOS()
IHasPOSnull.public static IndexWordID parseIndexWordID(String value)
toString()
method into an IndexWordIDvalue - the string to be parsedNullPointerException - if the specified string is nullIllegalArgumentException - if the specified string does not conform to an index word id
stringCopyright © 2018. All rights reserved.