public class Gazetteer extends Object
Entitys and their associated EntityNames from a file. These can
also be re-written to a file to simplify loading at a later time.| Modifier and Type | Class and Description |
|---|---|
static interface |
Gazetteer.EntityFilter |
| Constructor and Description |
|---|
Gazetteer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addEntity(Entity entity) |
Set<Entity> |
getEntities() |
Entity |
getEntity(String id) |
void |
load(Tokenizer tokenizer,
EntityType type,
String filename) |
void |
load(Tokenizer tokenizer,
String namesFilename) |
void |
load(Tokenizer tokenizer,
String namesFilename,
Gazetteer.EntityFilter entityFilter) |
void |
write(String namesFilename)
A gazetteer is written as two parts, one contains the Type, ID and EntityNames and the second contains the entity
relationships
|
public void load(Tokenizer tokenizer, EntityType type, String filename) throws IOException
IOExceptionpublic void load(Tokenizer tokenizer, String namesFilename) throws IOException
IOExceptionpublic void load(Tokenizer tokenizer, String namesFilename, Gazetteer.EntityFilter entityFilter) throws IOException
IOExceptionprotected void addEntity(Entity entity)
public void write(String namesFilename) throws IOException
type - namesFilename - relationshipFilename - IOExceptionCopyright © 2018 JULIE Lab, Germany. All rights reserved.