public class Token extends Object implements Comparable<Token>, Serializable
Constructor and Description |
---|
Token(String rawForm) |
Token(String rawForm,
String stemmedForm,
String posTag,
boolean isPunctuation,
boolean isStopWord) |
Modifier and Type | Method and Description |
---|---|
void |
addAlternativeForm(String alternativeForm,
Double score)
Adds a new surface form to the alternative forms of this token.
|
int |
compareTo(Token other) |
boolean |
equals(Object o) |
boolean |
equalsWithAlternativeForms(Token other)
Compares the given token to this one including alternative forms.
|
Set<String> |
getAlternativeForms()
Returns the unmodifiable list of alternative surface forms for this token.
|
String |
getPOSTag() |
String |
getRawForm() |
Map<String,Double> |
getScoredAlternativeForms()
Returns the map storing the scored alternative forms of this token.
|
String |
getStemmedForm() |
int |
hashCode() |
boolean |
isHead() |
boolean |
isPunctuation() |
boolean |
isStopWord() |
void |
setIsHead(boolean isHead) |
void |
setIsPunctuation(boolean isPunctuation) |
void |
setIsStopWord(boolean isStopWord) |
void |
setPOSTag(String posTag) |
void |
setStemmedForm(String stemmedForm) |
String |
toString() |
public String getRawForm()
public String getStemmedForm()
public Set<String> getAlternativeForms()
public Map<String,Double> getScoredAlternativeForms()
public void addAlternativeForm(String alternativeForm, Double score)
equalsWithAlternativeForms(org.dllearner.algorithms.isle.index.Token)
.public boolean isPunctuation()
public boolean isStopWord()
public void setStemmedForm(String stemmedForm)
stemmedForm
- the stemmedForm to setpublic void setIsPunctuation(boolean isPunctuation)
isPunctuation
- the isPunctuation to setpublic void setIsStopWord(boolean isStopWord)
isStopWord
- the isStopWord to setpublic void setIsHead(boolean isHead)
isHead
- the token is the head of the containg sequence of tokenspublic boolean isHead()
public boolean equalsWithAlternativeForms(Token other)
other
- token to compare this token topublic int compareTo(Token other)
compareTo
in interface Comparable<Token>
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2019 Jens Lehmann