opennlp.tools.parser.chunking
Class CheckContextGenerator

java.lang.Object
  extended by opennlp.tools.parser.AbstractContextGenerator
      extended by opennlp.tools.parser.chunking.CheckContextGenerator

public class CheckContextGenerator
extends AbstractContextGenerator

Class for generating predictive context for deciding when a constituent is complete.

Author:
Tom Morton

Field Summary
 
Fields inherited from class opennlp.tools.parser.AbstractContextGenerator
EOS, punctSet, useLabel, zeroBackOff
 
Constructor Summary
CheckContextGenerator()
          Creates a new context generator for generating predictive context for deciding when a constituent is complete.
 
Method Summary
 String[] getContext(Object o)
           
 String[] getContext(Parse[] constituents, String type, int start, int end)
          Returns predictive context for deciding whether the specified constituents between the specified start and end index can be combined to form a new constituent of the specified type.
 
Methods inherited from class opennlp.tools.parser.AbstractContextGenerator
checkcons, checkcons, cons, cons2, cons3, consbo, getFrontierNodes, production, punct, punctbo, surround
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckContextGenerator

public CheckContextGenerator()
Creates a new context generator for generating predictive context for deciding when a constituent is complete.

Method Detail

getContext

public String[] getContext(Object o)

getContext

public String[] getContext(Parse[] constituents,
                           String type,
                           int start,
                           int end)
Returns predictive context for deciding whether the specified constituents between the specified start and end index can be combined to form a new constituent of the specified type.

Parameters:
constituents - The constituents which have yet to be combined into new constituents.
type - The type of the new constituent proposed.
start - The first constituent of the proposed constituent.
end - The last constituent of the proposed constituent.
Returns:
The predictive context for deciding whether a new constituent should be created.


Copyright © 2010. All Rights Reserved.