opennlp.grok.realize
Class EdgeFactory

java.lang.Object
  |
  +--opennlp.grok.realize.EdgeFactory

public class EdgeFactory
extends java.lang.Object

The EdgeFactory is responsible for creating edges. A single edge factory instance per realization request is assumed.

Version:
$Revision: 1.12 $, $Date: 2003/02/07 13:14:57 $
Author:
Michael White

Field Summary
 opennlp.common.parse.Lexicon lexicon
          The lexicon used to create edges.
static java.lang.String NO_SEM_FLAG
          Flag used in the lexicon to indicate a purely syntactic edge, with no associated semantics.
 java.util.List preds
          The elementary predications to be covered.
 opennlp.common.parse.RuleGroup rules
          The rules used to create edges.
 java.util.List targets
          The target phrases for computing n-gram precision.
 
Constructor Summary
EdgeFactory(opennlp.common.parse.Lexicon lexicon, opennlp.common.parse.RuleGroup rules, java.util.List preds, java.util.List targets)
          Constructor.
 
Method Summary
 java.util.List createInitialEdges()
          Returns all lexical edges that cover some of the input semantics.
 java.util.List createNewEdges(Edge edge)
          Returns all edges that can be created by applying a unary rule to the given edge or by combining it with a purely syntactic edge.
 java.util.List createNewEdges(Edge edgeA, Edge edgeB, boolean bothDirections)
          Returns all edges that can be created by combining the given edges, with one or both directions tried according to the given flag.
 boolean pairedWith(Edge edgeA, Edge edgeB)
          Returns whether the indices for the two edges are in a PairedWith relation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lexicon

public final opennlp.common.parse.Lexicon lexicon
The lexicon used to create edges.


rules

public final opennlp.common.parse.RuleGroup rules
The rules used to create edges.


preds

public final java.util.List preds
The elementary predications to be covered.


targets

public final java.util.List targets
The target phrases for computing n-gram precision.


NO_SEM_FLAG

public static final java.lang.String NO_SEM_FLAG
Flag used in the lexicon to indicate a purely syntactic edge, with no associated semantics.

See Also:
Constant Field Values
Constructor Detail

EdgeFactory

public EdgeFactory(opennlp.common.parse.Lexicon lexicon,
                   opennlp.common.parse.RuleGroup rules,
                   java.util.List preds,
                   java.util.List targets)
Constructor.

Method Detail

pairedWith

public boolean pairedWith(Edge edgeA,
                          Edge edgeB)
Returns whether the indices for the two edges are in a PairedWith relation.


createInitialEdges

public java.util.List createInitialEdges()
Returns all lexical edges that cover some of the input semantics. Attribute-value predicates are allowed to be unmatched. Also initializes edges for semantically null lexical items.


createNewEdges

public java.util.List createNewEdges(Edge edgeA,
                                     Edge edgeB,
                                     boolean bothDirections)
Returns all edges that can be created by combining the given edges, with one or both directions tried according to the given flag. The edges are assumed not to overlap semantically.


createNewEdges

public java.util.List createNewEdges(Edge edge)
Returns all edges that can be created by applying a unary rule to the given edge or by combining it with a purely syntactic edge.



Copyright © 2003 Jason Baldridge and Gann Bierner. All Rights Reserved.