Package edu.upf.taln.dri.lib.model.ext
Class SentenceImpl
- java.lang.Object
-
- edu.upf.taln.dri.lib.model.BaseDocumentElem
-
- edu.upf.taln.dri.lib.model.ext.SentenceImpl
-
- All Implemented Interfaces:
Sentence
public class SentenceImpl extends BaseDocumentElem implements Sentence
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 SentenceImpl(DocCacheManager cacheManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBabelSynsetOcc(BabelSynsetOcc babelSynsetOcc)
void
addCandidateTerm(CandidateTermOcc candidateTerm)
void
addCitationMarker(CitationMarker citationMarker)
String
asString(boolean compactOutput)
String representation of the objectInteger
getAbstractId()
Return the ID of the abstract the sentence belongs to.List<BabelSynsetOcc>
getBabelSynsetsOcc()
List of candidate Babelnet synset occurrences spotted in the sentenceList<CandidateTermOcc>
getCandidateTerms()
List of candidate terms included in the sentenceList<CitationMarker>
getCitationMarkers()
List of citation markers included in the sentenceSection
getContainingSection()
Containing sectionInteger
getId()
Document-wide unambiguous sentence IdLangENUM
getLanguage()
Get the language of the sentenceMap<String,MetaEntityTypeENUM>
getMetaEntityMap()
RhetoricalClassENUM
getRhetoricalClass()
Rhetorical class of the sentenceMap<String,MetaEntityTypeENUM>
getSpottedEntities()
It the sentence is an acknowledgment (in the current version only acknowledgment sentences may contain spotted entities)String
getText()
Text of the sentenceList<Token>
getTokens()
List of tokens included in the sentenceboolean
isAck()
boolean
isAcknowledgment()
Check if a sentence is an acknowledgmentvoid
setAbstractId(Integer abstractId)
void
setAck(boolean isAck)
void
setContainingSection(Section containingSection)
void
setId(Integer id)
void
setLanguage(LangENUM languge)
void
setMetaEntityMap(Map<String,MetaEntityTypeENUM> metaEntityMap)
void
setRhetoricalClass(RhetoricalClassENUM rhetClass)
void
setText(String text)
void
setTokens(List<Token> tokens)
-
Methods inherited from class edu.upf.taln.dri.lib.model.BaseDocumentElem
getCacheManager, setCacheManager
-
-
-
-
Constructor Detail
-
SentenceImpl
public SentenceImpl(DocCacheManager cacheManager)
-
-
Method Detail
-
getId
public Integer getId()
Description copied from interface:Sentence
Document-wide unambiguous sentence Id
-
setId
public void setId(Integer id)
-
setText
public void setText(String text)
-
getAbstractId
public Integer getAbstractId()
Description copied from interface:Sentence
Return the ID of the abstract the sentence belongs to. For papers having only one abstract, if the sentence is included in the abstract, its abstract ID is equal to 1. For papers having more than one abstract (one per language for instance), if the sentence is included in the first abstract, its abstract ID is equal to 1, otherwise its abstract ID is equal to 2. Sentences that are not part of the abstract of the paper have the abstract ID value set to -1.- Specified by:
getAbstractId
in interfaceSentence
- Returns:
-
setAbstractId
public void setAbstractId(Integer abstractId)
-
setContainingSection
public void setContainingSection(Section containingSection)
-
getRhetoricalClass
public RhetoricalClassENUM getRhetoricalClass()
Description copied from interface:Sentence
Rhetorical class of the sentence- Specified by:
getRhetoricalClass
in interfaceSentence
- Returns:
-
setRhetoricalClass
public void setRhetoricalClass(RhetoricalClassENUM rhetClass)
-
getContainingSection
public Section getContainingSection()
Description copied from interface:Sentence
Containing section- Specified by:
getContainingSection
in interfaceSentence
- Returns:
-
getCitationMarkers
public List<CitationMarker> getCitationMarkers()
Description copied from interface:Sentence
List of citation markers included in the sentence- Specified by:
getCitationMarkers
in interfaceSentence
- Returns:
-
addCitationMarker
public void addCitationMarker(CitationMarker citationMarker)
-
getCandidateTerms
public List<CandidateTermOcc> getCandidateTerms()
Description copied from interface:Sentence
List of candidate terms included in the sentence- Specified by:
getCandidateTerms
in interfaceSentence
- Returns:
-
addCandidateTerm
public void addCandidateTerm(CandidateTermOcc candidateTerm)
-
isAck
public boolean isAck()
-
setAck
public void setAck(boolean isAck)
-
getMetaEntityMap
public Map<String,MetaEntityTypeENUM> getMetaEntityMap()
-
setMetaEntityMap
public void setMetaEntityMap(Map<String,MetaEntityTypeENUM> metaEntityMap)
-
getBabelSynsetsOcc
public List<BabelSynsetOcc> getBabelSynsetsOcc()
Description copied from interface:Sentence
List of candidate Babelnet synset occurrences spotted in the sentence- Specified by:
getBabelSynsetsOcc
in interfaceSentence
- Returns:
-
addBabelSynsetOcc
public void addBabelSynsetOcc(BabelSynsetOcc babelSynsetOcc)
-
getTokens
public List<Token> getTokens()
Description copied from interface:Sentence
List of tokens included in the sentence
-
setLanguage
public void setLanguage(LangENUM languge)
-
getLanguage
public LangENUM getLanguage()
Description copied from interface:Sentence
Get the language of the sentence- Specified by:
getLanguage
in interfaceSentence
- Returns:
-
asString
public String asString(boolean compactOutput)
Description copied from interface:Sentence
String representation of the object
-
isAcknowledgment
public boolean isAcknowledgment()
Description copied from interface:Sentence
Check if a sentence is an acknowledgment- Specified by:
isAcknowledgment
in interfaceSentence
- Returns:
-
getSpottedEntities
public Map<String,MetaEntityTypeENUM> getSpottedEntities()
Description copied from interface:Sentence
It the sentence is an acknowledgment (in the current version only acknowledgment sentences may contain spotted entities)- Specified by:
getSpottedEntities
in interfaceSentence
- Returns:
-
-