it.jrc.entitymatcher
Class EntityMatchResult
java.lang.Object
it.jrc.entitymatcher.EntityMatchResult
public class EntityMatchResult
- extends java.lang.Object
Method Summary |
void |
addMatch(char[] data,
int index,
java.lang.String word,
int wordIndex,
int charIndex)
addMatch is called when a string in the text matches a pattern (i.e. an alias)
this alias can itself represent more than one entity!! |
java.util.ArrayList<java.lang.String> |
getAliases(int id)
|
java.util.ArrayList<java.lang.Integer> |
getCharIndexes(int id)
|
java.util.Set<java.lang.Integer> |
getEntities()
|
java.lang.Character |
getType(int id)
|
int |
getWordCount()
|
void |
reset()
|
void |
setWordCount(int n)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityMatchResult
public EntityMatchResult(int languageCode)
reset
public void reset()
addMatch
public void addMatch(char[] data,
int index,
java.lang.String word,
int wordIndex,
int charIndex)
- addMatch is called when a string in the text matches a pattern (i.e. an alias)
this alias can itself represent more than one entity!!
- Parameters:
data
- is the data array that contains ALL aliases and associated information structuresindex
- is a pointer in this data array, it will point to the last char of the patternword
- is the actual string in the text that matches this patternwordIndex
- is the index of the word in the textcharIdex
- is the character index of the word in the text
setWordCount
public void setWordCount(int n)
getWordCount
public int getWordCount()
getEntities
public java.util.Set<java.lang.Integer> getEntities()
getType
public java.lang.Character getType(int id)
getAliases
public java.util.ArrayList<java.lang.String> getAliases(int id)
getCharIndexes
public java.util.ArrayList<java.lang.Integer> getCharIndexes(int id)