Package edu.upf.taln.dri.lib.model.ext
Class TokenImpl
- java.lang.Object
-
- edu.upf.taln.dri.lib.model.BaseDocumentElem
-
- edu.upf.taln.dri.lib.model.ext.TokenImpl
-
- All Implemented Interfaces:
Token
public class TokenImpl extends BaseDocumentElem implements Token
IMPORTANT: Never instantiate directly this class!
Sentence of a document together with its descriptive features.
-
-
Field Summary
-
Fields inherited from class edu.upf.taln.dri.lib.model.BaseDocumentElem
cacheManager
-
-
Constructor Summary
Constructors Constructor Description TokenImpl(DocCacheManager cacheManager, Integer sentenceId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
asString(boolean compactOutput)
String representation of the objectInteger
getContainingSentence()
The document-wide unambiguous id that references theSentence
of the document that includes the citation markerInteger
getId()
The document unambiguous ID of the tokenInteger
getInSentencePosition()
The position of the token inside the sentenceString
getLemma()
The token lemmaString
getPOS()
The token Part-Of-SpeechString
getWord()
The token textvoid
setContainingSentence(Integer containingSentence)
void
setId(Integer id)
void
setInSentencePosition(Integer inSentencePosition)
void
setLemma(String lemma)
void
setPOS(String pOS)
void
setWord(String word)
-
Methods inherited from class edu.upf.taln.dri.lib.model.BaseDocumentElem
getCacheManager, setCacheManager
-
-
-
-
Constructor Detail
-
TokenImpl
public TokenImpl(DocCacheManager cacheManager, Integer sentenceId)
-
-
Method Detail
-
getId
public Integer getId()
Description copied from interface:Token
The document unambiguous ID of the token
-
getInSentencePosition
public Integer getInSentencePosition()
Description copied from interface:Token
The position of the token inside the sentence- Specified by:
getInSentencePosition
in interfaceToken
- Returns:
-
getContainingSentence
public Integer getContainingSentence()
Description copied from interface:Token
The document-wide unambiguous id that references theSentence
of the document that includes the citation marker- Specified by:
getContainingSentence
in interfaceToken
- Returns:
-
setId
public void setId(Integer id)
-
setInSentencePosition
public void setInSentencePosition(Integer inSentencePosition)
-
setContainingSentence
public void setContainingSentence(Integer containingSentence)
-
setWord
public void setWord(String word)
-
setLemma
public void setLemma(String lemma)
-
setPOS
public void setPOS(String pOS)
-
-