opennlp.grok.grammar
Class GenericRule
java.lang.Object
|
+--opennlp.grok.grammar.AbstractRule
|
+--opennlp.grok.grammar.GenericRule
- All Implemented Interfaces:
- opennlp.common.parse.Rule
- public class GenericRule
- extends AbstractRule
The representation of a CCG rule. The rule itself is * represented as an
array, with the result category as the last element. For example, the
function application rule will produce the array [ X/Y , Y , X ] for cats.
- Version:
- $Revision: 1.8 $, $Date: 2002/08/13 10:41:45 $
- Author:
- Gann Bierner
Field Summary |
protected opennlp.common.synsem.Category[] |
_arguments
An array of the categories which define this rule. |
protected opennlp.common.synsem.Category |
_result
|
Constructor Summary |
GenericRule(opennlp.common.synsem.Category[] args,
opennlp.common.synsem.Category result,
java.lang.String n)
|
Method Summary |
java.util.List |
applyRule(opennlp.common.synsem.Category[] inputs)
|
int |
arity()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_arguments
protected opennlp.common.synsem.Category[] _arguments
- An array of the categories which define this rule.
_result
protected opennlp.common.synsem.Category _result
GenericRule
public GenericRule(opennlp.common.synsem.Category[] args,
opennlp.common.synsem.Category result,
java.lang.String n)
arity
public int arity()
applyRule
public java.util.List applyRule(opennlp.common.synsem.Category[] inputs)
throws opennlp.common.unify.UnifyFailure
- Specified by:
applyRule
in interface opennlp.common.parse.Rule
- Specified by:
applyRule
in class AbstractRule
opennlp.common.unify.UnifyFailure
toString
public java.lang.String toString()
- Specified by:
toString
in class AbstractRule
Copyright © 2003 Jason Baldridge and Gann Bierner. All Rights Reserved.