|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectat.ofai.gate.jape.Transducer
at.ofai.gate.jape.Rule
public class Rule
A CPSL rule. Has an LHS, RHS and a name, and a priority.
| Field Summary |
|---|
| Fields inherited from class at.ofai.gate.jape.Transducer |
|---|
interrupted, name, ontology |
| Fields inherited from interface at.ofai.gate.jape.JapeConstants |
|---|
APPELT_STYLE, BRILL_STYLE, DEFAULT_PRIORITY, EQUAL, FIRST_STYLE, GREATER, GREATER_OR_EQUAL, INDENT_PADDING, KLEENE_PLUS, KLEENE_QUERY, KLEENE_STAR, LESSER, LESSER_OR_EQUAL, MULTI_SPAN_BINDING, NO_BINDING, NO_KLEENE_OP, NOT_EQUAL, NOT_REGEXP, ONCE_STYLE, REGEXP, SINGLE_SPAN_BINDING |
| Constructor Summary | |
|---|---|
Rule(java.lang.String name,
int position,
int priority,
LeftHandSide lhs,
RightHandSide rhs)
Construction |
|
| Method Summary | |
|---|---|
void |
addProcessProgressListener(gate.event.ProgressListener listener)
|
void |
addStatusListener(gate.event.StatusListener listener)
|
void |
cleanUp()
Clean up (delete action class files, for e.g.). |
void |
finish()
Finish: replace dynamic data structures with Java arrays; called after parsing. |
boolean |
finished()
Have we hit the end of the document without matching? |
int |
getEndPosition()
Return the ending position of a match. |
LeftHandSide |
getLHS()
|
int |
getNextMatch(gate.Document doc,
int position,
int end)
If another match at or beyond position is possible return
the position we want to fire in, else -1. |
int |
getPosition()
Get the rule's position in sequence (e.g. |
int |
getPriority()
Get the rule priority. |
RightHandSide |
getRHS()
|
int |
getStartPosition()
Return the starting position of a match. |
boolean |
matches(gate.Document doc,
int position,
MutableInteger newPosition)
Does this element match the document at this position? |
int |
pending()
If we're pending (have matched), get the position we want to fire in, else -1. |
void |
removeProcessProgressListener(gate.event.ProgressListener listener)
|
void |
removeStatusListener(gate.event.StatusListener listener)
|
void |
reset()
Clear away the results of a match. |
java.lang.String |
toString()
Create a string representation of the object. |
java.lang.String |
toString(java.lang.String pad)
Create a string representation of the object. |
void |
transduce(gate.Document doc,
gate.AnnotationSet inputAS,
gate.AnnotationSet outputAS)
Apply the RHS of this rule (LHS must have been matched first). |
| Methods inherited from class at.ofai.gate.jape.Transducer |
|---|
addProgressListener, fireProcessFinished, fireProgressChanged, fireStatusChanged, getBaseURL, getName, getOntology, interrupt, isDebugMode, isInterrupted, removeProgressListener, setBaseURL, setDebugMode, setOntology |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Rule(java.lang.String name,
int position,
int priority,
LeftHandSide lhs,
RightHandSide rhs)
| Method Detail |
|---|
public int getPriority()
public int getPosition()
public int pending()
public boolean finished()
public void finish()
finish in class Transducer
public int getNextMatch(gate.Document doc,
int position,
int end)
position is possible return
the position we want to fire in, else -1.
public int getEndPosition()
public int getStartPosition()
public boolean matches(gate.Document doc,
int position,
MutableInteger newPosition)
public void transduce(gate.Document doc,
gate.AnnotationSet inputAS,
gate.AnnotationSet outputAS)
throws JapeException
transduce in class TransducerJapeExceptionpublic void reset()
public void cleanUp()
cleanUp in class Transducerpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(java.lang.String pad)
toString in class Transducerpublic LeftHandSide getLHS()
public RightHandSide getRHS()
public void addStatusListener(gate.event.StatusListener listener)
addStatusListener in class Transducerpublic void removeStatusListener(gate.event.StatusListener listener)
removeStatusListener in class Transducerpublic void addProcessProgressListener(gate.event.ProgressListener listener)
public void removeProcessProgressListener(gate.event.ProgressListener listener)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||