|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gate.jape.Transducer | +--gate.jape.SinglePhaseTransducer
Represents a complete CPSL grammar, with a phase name, options and rule set (accessible by name and by sequence). Implements a transduce method taking a Document as input. Constructs from String or File.
Field Summary | |
private static boolean |
DEBUG
Debug flag |
private boolean |
finishedAlready
Whether the finish method has been called or not. |
(package private) FSM |
fsm
|
(package private) Set |
input
Defines the types of input annotations that this transducer reads. |
private HashMap |
optionSettings
The values of any option settings given. |
private Vector |
progressListeners
|
private int |
ruleApplicationStyle
Type of rule application (constants defined in JapeConstants). |
private PrioritisedRuleList |
rules
The list of rules in this transducer. |
Fields inherited from class gate.jape.Transducer |
baseURL, name, statusListeners |
Fields inherited from interface gate.jape.JapeConstants |
APPELT_STYLE, BRILL_STYLE, DEFAULT_PRIORITY, FIRST_STYLE, INDENT_PADDING, KLEENE_PLUS, KLEENE_QUERY, KLEENE_STAR, MULTI_SPAN_BINDING, NO_BINDING, NO_KLEENE_OP, SINGLE_SPAN_BINDING |
Constructor Summary | |
SinglePhaseTransducer(String name)
Construction from name. |
Method Summary | |
void |
addInput(String ident)
Adds a new type of input annotations used by this transducer. |
void |
addProgressListener(ProgressListener l)
|
void |
addRule(Rule rule)
Add a rule. |
void |
cleanUp()
Clean up (delete action class files, for e.g.). |
void |
finish()
Finish: replace dynamic data structures with Java arrays; called after parsing. |
protected void |
fireProcessFinished()
|
protected void |
fireProgressChanged(int e)
This property affects the Appelt style of rules application. |
String |
getOption(String name)
Get the value for a particular option. |
int |
getRuleApplicationStyle()
|
PrioritisedRuleList |
getRules()
|
void |
removeProgressListener(ProgressListener l)
|
void |
setOption(String name,
String setting)
Add an option setting. |
void |
setRuleApplicationStyle(int style)
Set the type of rule application (types defined in JapeConstants). |
String |
toString()
A string representation of this object. |
String |
toString(String pad)
A string representation of this object. |
void |
transduce(Document doc,
AnnotationSet inputAS,
AnnotationSet outputAS)
Transduce a document using the annotation set provided and the current rule application style. |
void |
transduce1(Document doc,
AnnotationSet annotationSet)
Transduce a document using the annotation set provided and the current rule application style. |
Methods inherited from class gate.jape.Transducer |
addStatusListener, fireStatusChanged, getBaseURL, getName, removeStatusListener, setBaseURL |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final boolean DEBUG
private int ruleApplicationStyle
private PrioritisedRuleList rules
FSM fsm
private HashMap optionSettings
private boolean finishedAlready
Set input
private transient Vector progressListeners
Constructor Detail |
public SinglePhaseTransducer(String name)
Method Detail |
public void setRuleApplicationStyle(int style)
public void addRule(Rule rule)
public void setOption(String name, String setting)
public String getOption(String name)
public void finish()
finish
in class Transducer
public void transduce1(Document doc, AnnotationSet annotationSet) throws JapeException
public void transduce(Document doc, AnnotationSet inputAS, AnnotationSet outputAS) throws JapeException
transduce
in class Transducer
public void cleanUp()
cleanUp
in class Transducer
public String toString()
toString
in class Object
public String toString(String pad)
toString
in class Transducer
public PrioritisedRuleList getRules()
public void addInput(String ident)
public void removeProgressListener(ProgressListener l)
removeProgressListener
in class Transducer
public void addProgressListener(ProgressListener l)
addProgressListener
in class Transducer
protected void fireProgressChanged(int e)
Transducer
fireProgressChanged
in class Transducer
protected void fireProcessFinished()
fireProcessFinished
in class Transducer
public int getRuleApplicationStyle()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |