public class BabelfyToken extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<BabelfyToken>
Modifier and Type | Field and Description |
---|---|
static BabelfyToken |
EOS
End-Of-Sentence token to use as sentence separator, in order to avoid compounding across
sentences and/or languages.
|
Constructor and Description |
---|
BabelfyToken(java.lang.String word)
Initializes a new Token with a word.
|
BabelfyToken(java.lang.String word,
it.uniroma1.lcl.jlt.util.Language language)
Initializes a new Token with a word and a
Language . |
BabelfyToken(java.lang.String word,
PosTag tag)
Initializes a new Token with a word and
PosTag |
BabelfyToken(java.lang.String word,
java.lang.String lemma,
PosTag tag)
Initializes a new Token with a word, lemma and
PosTag |
BabelfyToken(java.lang.String word,
java.lang.String lemma,
PosTag tag,
it.uniroma1.lcl.jlt.util.Language lang)
Initializes a new Token with a word, lemma,
PosTag and a Language . |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(BabelfyToken o) |
int |
getBeginPosition() |
int |
getEndPosition() |
it.uniroma1.lcl.jlt.util.Language |
getLanguage() |
java.lang.String |
getLemma() |
PosTag |
getPosTag() |
java.lang.String |
getWord() |
void |
setBeginPosition(int beginPosition) |
void |
setEndPosition(int endPosition) |
void |
setLanguage(it.uniroma1.lcl.jlt.util.Language language) |
void |
setLemma(java.lang.String lemma) |
void |
setPostag(PosTag postag) |
java.lang.String |
toString() |
public static final BabelfyToken EOS
public BabelfyToken(java.lang.String word)
word
- a wordpublic BabelfyToken(java.lang.String word, it.uniroma1.lcl.jlt.util.Language language)
Language
.word
- a wordlanguage
- the languagepublic BabelfyToken(java.lang.String word, PosTag tag)
PosTag
word
- a wordtag
- the tagpublic BabelfyToken(java.lang.String word, java.lang.String lemma, PosTag tag)
PosTag
word
- a wordlemma
- its lemamtag
- the tagpublic java.lang.String getLemma()
public void setLemma(java.lang.String lemma)
lemma
- the lemma to setpublic it.uniroma1.lcl.jlt.util.Language getLanguage()
Language
public void setLanguage(it.uniroma1.lcl.jlt.util.Language language)
language
- the Language
to setpublic java.lang.String getWord()
public int getBeginPosition()
public void setBeginPosition(int beginPosition)
beginPosition
- the beginPosition to setpublic int getEndPosition()
public void setEndPosition(int endPosition)
endPosition
- the endPosition to setpublic int compareTo(BabelfyToken o)
compareTo
in interface java.lang.Comparable<BabelfyToken>
public java.lang.String toString()
toString
in class java.lang.Object