sk.sav.ui.ikt.nlp.gazetteer.character
Class CharacterGazetteer
java.lang.Object
sk.sav.ui.ikt.nlp.gazetteer.Gazetteer
sk.sav.ui.ikt.nlp.gazetteer.character.CharacterGazetteer
public class CharacterGazetteer
- extends Gazetteer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ENTITIES
public long ENTITIES
INPUT_CHARACTERS_COUNT
public long INPUT_CHARACTERS_COUNT
CharacterGazetteer
public CharacterGazetteer(CharacterGazetteer.Representation r,
boolean caseSensitive)
getRoot
public Node getRoot()
insert
public void insert(String s)
- Description copied from class:
Gazetteer
- Inserts an entity into the gazetteer's list. Duplicate entities won't be
inserted. Entities can be inserted into the gazetteer's list anytime
between calling of methods
Gazetteer.find(String)
and
Gazetteer.find(InputStream)
.
- Specified by:
insert
in class Gazetteer
- Parameters:
s
- - entity to be inserted into the gazetteer's list
insert
public void insert(String s,
int id)
- Description copied from class:
Gazetteer
- This method has the same behavior as
Gazetteer.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.
- Specified by:
insert
in class Gazetteer
- Parameters:
s
- - entity to be inserted into the gazetteer's listid
- - ID to be assigned the entity represented by string s
find
public List<int[]> find(String s)
- Description copied from class:
Gazetteer
- Performs a search in the specified string for known entities defined in
the gazetteer's list.
- Specified by:
find
in class Gazetteer
- Parameters:
s
- - text to be searched
- Returns:
- A list of results, where each result is an array of integers with
following structure: [start position, end position, ID1, ID2,
...]
find
public List<int[]> find(InputStream is)
throws IOException
- Description copied from class:
Gazetteer
- Performs a search in the specified input stream of text for known
entities defined in the gazetteer's list.
- Specified by:
find
in class Gazetteer
- Parameters:
is
- - input steam of text to be searched
- Returns:
- A list of results, where each result is an array of integers with
following structure: [start position, end position, ID1, ID2,
...]
- Throws:
IOException
match
public List<int[]> match(PushbackReader reader)
throws IOException
- Throws:
IOException