ipipan.spejd.rules
Class Gazetteer
java.lang.Object
ipipan.spejd.rules.Gazetteer
- All Implemented Interfaces:
- Match
public class Gazetteer
- extends java.lang.Object
- implements Match
Not official yet.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Gazetteer
public Gazetteer(int order,
int type,
Config conf)
addEntry
public void addEntry(GazetteerEntry entry)
concatAttr
public java.lang.String concatAttr(int id,
Entity[] s,
int start,
int length,
boolean countNospace)
- This is a modified copy of Entity's method - to get rid of "static".
Concatenate orth or base of a sequence of entities, adding
space or not with respect to ns special entities.
- Parameters:
id
- attribute to concatenate (Attribute.ORTH or Attribute.BASE)s
- an array of Entitiesstart
- start of the sequence to concatenatelength
- length of the sequence to concatenatecountNospace
- whether NOSPACE should be counted in the length
apply
public boolean apply(Entity[] chunk)
getSingle
public Entity getSingle(int s)
- Specified by:
getSingle
in interface Match
getSpec
public Entity[] getSpec(int s)
- Specified by:
getSpec
in interface Match
get
public Entity[] get(int[] s)
- Specified by:
get
in interface Match
getMatch
public Entity[] getMatch()
- Specified by:
getMatch
in interface Match
log
public void log(java.io.PrintStream log)
report
public void report(java.io.PrintStream log)