public class CharacterOffsetToLineTokenConverterCtakesImpl extends Object implements CharacterOffsetToLineTokenConverter
Modifier and Type | Field and Description |
---|---|
protected TreeMap<Integer,Sentence> |
beginTreeMap |
protected org.apache.uima.jcas.JCas |
jcas |
protected org.apache.log4j.Logger |
logger |
protected Map<Sentence,List<BaseToken>> |
sentenceToTokenNumberMap |
protected TreeSet<Integer> |
tokenBeginEndTreeSet |
Constructor and Description |
---|
CharacterOffsetToLineTokenConverterCtakesImpl() |
CharacterOffsetToLineTokenConverterCtakesImpl(org.apache.uima.jcas.JCas jcas) |
Modifier and Type | Method and Description |
---|---|
int |
adjustOffsetToBestMatch(int original) |
void |
buildSentenceBoundaryMap() |
protected void |
buildSentenceToTokenNumberMap() |
void |
buildTokenBoundaryMap() |
List<LineAndTokenPosition> |
calculateBeginAndEndOfConcept(ApiConcept problem) |
List<LineAndTokenPosition> |
calculateBeginAndEndOfConcept(int problemBegin,
int problemEnd) |
LineAndTokenPosition |
convert(int characterOffset) |
LineAndTokenPosition |
convertCharacterOffsetToLineToken(int characterOffset) |
Sentence |
findPreviousOrCurrentSentence(int characterOffset) |
BaseToken |
getNextNonEOLToken(org.apache.uima.cas.FSIterator<org.apache.uima.jcas.tcas.Annotation> tokensInSentenceIterator) |
protected org.apache.log4j.Logger logger
protected org.apache.uima.jcas.JCas jcas
public CharacterOffsetToLineTokenConverterCtakesImpl()
public CharacterOffsetToLineTokenConverterCtakesImpl(org.apache.uima.jcas.JCas jcas)
public void buildSentenceBoundaryMap()
public void buildTokenBoundaryMap()
protected void buildSentenceToTokenNumberMap()
public Sentence findPreviousOrCurrentSentence(int characterOffset)
public LineAndTokenPosition convert(int characterOffset)
public int adjustOffsetToBestMatch(int original)
public LineAndTokenPosition convertCharacterOffsetToLineToken(int characterOffset)
public BaseToken getNextNonEOLToken(org.apache.uima.cas.FSIterator<org.apache.uima.jcas.tcas.Annotation> tokensInSentenceIterator)
public List<LineAndTokenPosition> calculateBeginAndEndOfConcept(ApiConcept problem)
public List<LineAndTokenPosition> calculateBeginAndEndOfConcept(int problemBegin, int problemEnd)
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.