gov.llnl.ontology.text.tag
Class OpenNlpMEPOSTagger

java.lang.Object
  extended by gov.llnl.ontology.text.tag.OpenNlpMEPOSTagger
All Implemented Interfaces:
opennlp.tools.postag.POSTagger

public class OpenNlpMEPOSTagger
extends Object
implements opennlp.tools.postag.POSTagger

A wrapper around the POSTaggerME POSTagger so that it can be loaded with a no argument constructor using a predefined model.

Author:
Keith Stevens

Field Summary
static String DEFAULT_MODEL
           
 
Constructor Summary
OpenNlpMEPOSTagger()
          Loads the model configuration from DEFAULT_MODEL
OpenNlpMEPOSTagger(String modelPath, boolean loadFromJar)
          Loads a POSTaggerME model from modelPath.
 
Method Summary
 List<String> tag(List<String> sentence)
          Deprecated. 
 String tag(String sentence)
          Deprecated. 
 String[] tag(String[] sentence)
          
 opennlp.tools.util.Sequence[] topKSequences(List<String> sentence)
          Deprecated. 
 opennlp.tools.util.Sequence[] topKSequences(String[] sentence)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MODEL

public static final String DEFAULT_MODEL
See Also:
Constant Field Values
Constructor Detail

OpenNlpMEPOSTagger

public OpenNlpMEPOSTagger()
Loads the model configuration from DEFAULT_MODEL


OpenNlpMEPOSTagger

public OpenNlpMEPOSTagger(String modelPath,
                          boolean loadFromJar)
Loads a POSTaggerME model from modelPath. If loadFromJar is true, the binary file will be found from within the running class path.

Method Detail

tag

@Deprecated
public List<String> tag(List<String> sentence)
Deprecated. 

Specified by:
tag in interface opennlp.tools.postag.POSTagger

tag

@Deprecated
public String tag(String sentence)
Deprecated. 

Specified by:
tag in interface opennlp.tools.postag.POSTagger

tag

public String[] tag(String[] sentence)

Specified by:
tag in interface opennlp.tools.postag.POSTagger

topKSequences

@Deprecated
public opennlp.tools.util.Sequence[] topKSequences(List<String> sentence)
Deprecated. 

Specified by:
topKSequences in interface opennlp.tools.postag.POSTagger

topKSequences

public opennlp.tools.util.Sequence[] topKSequences(String[] sentence)

Specified by:
topKSequences in interface opennlp.tools.postag.POSTagger


Copyright © 2010-2011. All Rights Reserved.