|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.sav.ui.ikt.nlp.gazetteer.Gazetteer
public abstract class Gazetteer
Constructor Summary | |
---|---|
Gazetteer()
|
Method Summary | |
---|---|
protected void |
addResult(ArrayList<int[]> results,
int start,
int end,
int[] ids)
Creates a new result and appends is to the list of results. |
abstract List<int[]> |
find(InputStream is)
Performs a search in the specified input stream of text for known entities defined in the gazetteer's list. |
abstract List<int[]> |
find(String text)
Performs a search in the specified string for known entities defined in the gazetteer's list. |
abstract void |
insert(String entity)
Inserts an entity into the gazetteer's list. |
abstract void |
insert(String entity,
int id)
This method has the same behavior as insert(String) except that
an ID can be assigned to the inserted entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Gazetteer()
Method Detail |
---|
public abstract void insert(String entity)
find(String)
and
find(InputStream)
.
entity
- - entity to be inserted into the gazetteer's listpublic abstract void insert(String entity, int id)
insert(String)
except that
an ID can be assigned to the inserted entity. There can be multiple ids
assigned for the same entity by calling this method again but with
different ID values.
entity
- - entity to be inserted into the gazetteer's listid
- - ID to be assigned the entity represented by string spublic abstract List<int[]> find(String text)
text
- - text to be searched
public abstract List<int[]> find(InputStream is) throws IOException
is
- - input steam of text to be searched
IOException
protected void addResult(ArrayList<int[]> results, int start, int end, int[] ids)
results
- - list of resultsstart
- - start position of the resultsend
- - end position of the resultsids
- - ids assigned to the results
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |