gov.llnl.ontology.text.sentsplit
Class OpenNlpMESentenceSplitter
java.lang.Object
gov.llnl.ontology.text.sentsplit.OpenNlpMESentenceSplitter
- All Implemented Interfaces:
- opennlp.tools.sentdetect.SentenceDetector
public class OpenNlpMESentenceSplitter
- extends Object
- implements opennlp.tools.sentdetect.SentenceDetector
A wrapper around the SentenceDetectorME
SentenceDetector
so
that it can be loaded with a no argument constructor using a predefined
model.
- Author:
- Keith Stevens
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_MODEL
public static final String DEFAULT_MODEL
- See Also:
- Constant Field Values
OpenNlpMESentenceSplitter
public OpenNlpMESentenceSplitter()
- Loads the model configuration from
DEFAULT_MODEL
OpenNlpMESentenceSplitter
public OpenNlpMESentenceSplitter(String modelPath,
boolean loadFromJar)
- Loads a
SentenceDetectorME
model from modelPath
. If
loadFromJar
is true, the binary file will found within the
running class path.
sentDetect
public String[] sentDetect(String sentence)
-
- Specified by:
sentDetect
in interface opennlp.tools.sentdetect.SentenceDetector
sentPosDetect
public opennlp.tools.util.Span[] sentPosDetect(String sentence)
-
- Specified by:
sentPosDetect
in interface opennlp.tools.sentdetect.SentenceDetector
Copyright © 2010-2011. All Rights Reserved.