public class TransformRule extends Object
| Constructor and Description |
|---|
TransformRule()
create a new TransformRule.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Document doc,
Annotation[] tokens,
int pos,
ClassHierarchyResolver resolver)
determines whether the left-hand side of the rule matches the tokens
beginning with token[pos].
|
int |
getPatternTokenCount()
return a count of the number of tokens to be matched by the left-hand
(match) portion of the rule.
|
void |
setChangeRule(edu.nyu.jet.ne.ChangeType type,
ChangeRule[] changeRules)
set the right-hand (change) portion of the rule.
|
void |
setMatchRules(MatchRuleItem[] ruleItems)
set the left-hand (match) portion of the rule.
|
void |
transform(Document doc,
Annotation[] tokens,
int pos)
applies the transformation (right-hand part) of the rule to the tokens
starting with token[pos].
|
public void setMatchRules(MatchRuleItem[] ruleItems)
public void setChangeRule(edu.nyu.jet.ne.ChangeType type,
ChangeRule[] changeRules)
public int getPatternTokenCount()
public boolean accept(Document doc, Annotation[] tokens, int pos, ClassHierarchyResolver resolver)
public void transform(Document doc, Annotation[] tokens, int pos)
Copyright © 2016 New York University. All rights reserved.