it.jrc.entitymatcher
Class EntityMatchResult

java.lang.Object
  extended by it.jrc.entitymatcher.EntityMatchResult

public class EntityMatchResult
extends java.lang.Object


Constructor Summary
EntityMatchResult(int languageCode)
           
 
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
 

Constructor Detail

EntityMatchResult

public EntityMatchResult(int languageCode)
Method Detail

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 structures
index - is a pointer in this data array, it will point to the last char of the pattern
word - is the actual string in the text that matches this pattern
wordIndex - is the index of the word in the text
charIdex - 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)