public abstract class Transducer extends Object implements Serializable, Benchmarkable
Modifier and Type | Field and Description |
---|---|
protected ActionContext |
actionContext |
protected Map<Object,Object> |
benchmarkFeatures
Shared featureMap
|
protected String |
benchmarkID
Benchmark ID of this transducer.
|
protected boolean |
enableDebugging
Switch used to activate the JAPE debugger
|
protected boolean |
interrupted |
protected String |
name
Name of this transducer.
|
protected Ontology |
ontology |
Constructor and Description |
---|
Transducer() |
Modifier and Type | Method and Description |
---|---|
void |
addProgressListener(ProgressListener l) |
void |
addStatusListener(StatusListener l) |
abstract void |
cleanUp()
Clean up (delete action class files, for e.g.).
|
abstract void |
finish(GateClassLoader classLoader)
Finish: parsing is complete so now we need to do some small amount of final
processing before loading the grammars into the specified classloader.
|
protected void |
fireProcessFinished() |
protected void |
fireProgressChanged(int e)
This property affects the Appelt style of rules application.
|
protected void |
fireStatusChanged(String e) |
URL |
getBaseURL() |
String |
getBenchmarkId()
Gets the benchmark ID of this transducer.
|
String |
getName()
Get the phase name of this transducer
|
Ontology |
getOntology()
Gets the ontology used by this transducer;
|
void |
interrupt()
Notifies this PR that it should stop its execution as soon as possible.
|
boolean |
isDebugMode() |
boolean |
isEnableDebugging() |
boolean |
isInterrupted()
Checks whether this PR has been interrupted since the last time its
transduce(Document, AnnotationSet, AnnotationSet) method was called. |
boolean |
isMatchGroupMode() |
boolean |
isNegationCompatMode() |
void |
removeProgressListener(ProgressListener l) |
void |
removeStatusListener(StatusListener l) |
void |
setActionContext(ActionContext ac) |
void |
setBaseURL(URL newBaseURL) |
void |
setBenchmarkId(String benchmarkId)
Set the benchmark ID for this transducer.
|
void |
setDebugMode(boolean debugMode) |
void |
setEnableDebugging(boolean enableDebugging) |
void |
setMatchGroupMode(boolean mode) |
void |
setNegationCompatMode(boolean negationCompatMode) |
void |
setOntology(Ontology ontology)
Sets the ontology used by this transducer;
|
abstract String |
toString(String pad)
Create a string representation of the object with padding.
|
abstract void |
transduce(Document doc,
AnnotationSet inputAS,
AnnotationSet outputAS)
Transduce a document.
|
protected Map<Object,Object> benchmarkFeatures
protected String benchmarkID
protected boolean interrupted
protected boolean enableDebugging
protected ActionContext actionContext
public Transducer()
public String getBenchmarkId()
getBenchmarkId
in interface Benchmarkable
public void setBenchmarkId(String benchmarkId)
setBenchmarkId
in interface Benchmarkable
benchmarkId
- the benchmark ID, which must not contain spaces
as it is already used as a separator in the log, you can use
Benchmark.createBenchmarkId(String, String)
for it.public abstract void transduce(Document doc, AnnotationSet inputAS, AnnotationSet outputAS) throws JapeException, ExecutionException
JapeException
ExecutionException
public abstract void finish(GateClassLoader classLoader)
public abstract void cleanUp()
public abstract String toString(String pad)
public boolean isInterrupted()
transduce(Document, AnnotationSet, AnnotationSet)
method was called.public void interrupt()
public void setBaseURL(URL newBaseURL)
public URL getBaseURL()
public void removeProgressListener(ProgressListener l)
public void addProgressListener(ProgressListener l)
public void setDebugMode(boolean debugMode)
public boolean isDebugMode()
public void setMatchGroupMode(boolean mode)
public boolean isMatchGroupMode()
protected void fireProgressChanged(int e)
protected void fireProcessFinished()
public void removeStatusListener(StatusListener l)
public void addStatusListener(StatusListener l)
protected void fireStatusChanged(String e)
public Ontology getOntology()
Ontology
value;public void setOntology(Ontology ontology)
ontology
- an Ontology
value;public boolean isEnableDebugging()
public void setEnableDebugging(boolean enableDebugging)
public boolean isNegationCompatMode()
public void setNegationCompatMode(boolean negationCompatMode)
public void setActionContext(ActionContext ac)