|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectopennlp.tools.sentdetect.SentenceDetectorME
public class SentenceDetectorME
A sentence detector for splitting up raw text into sentences.
A maximum entropy model is used to evaluate the characters ".", "!", and "?" in a string to determine if they signify the end of a sentence.
| Field Summary | |
|---|---|
static String |
NO_SPLIT
Constant indicates no sentence split. |
static String |
SPLIT
Constant indicates a sentence split. |
| Constructor Summary | |
|---|---|
SentenceDetectorME(SentenceModel model)
Initializes the current instance. |
|
SentenceDetectorME(SentenceModel model,
Factory factory)
Deprecated. Use a SentenceDetectorFactory to extend
SentenceDetector functionality. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SPLIT
public static final String NO_SPLIT
| Constructor Detail |
|---|
public SentenceDetectorME(SentenceModel model)
model - the SentenceModel
public SentenceDetectorME(SentenceModel model,
Factory factory)
SentenceDetectorFactory to extend
SentenceDetector functionality.
| Method Detail |
|---|
public String[] sentDetect(String s)
sentDetect in interface SentenceDetectors - The string to be processed.
public Span[] sentPosDetect(String s)
sentPosDetect in interface SentenceDetectors - The string to be processed.
public double[] getSentenceProbabilities()
public static SentenceModel train(String languageCode,
ObjectStream<SentenceSample> samples,
boolean useTokenEnd,
Dictionary abbreviations,
TrainingParameters mlParams)
throws IOException
train(String, ObjectStream, SentenceDetectorFactory, TrainingParameters)
and pass in af SentenceDetectorFactory.
IOException
public static SentenceModel train(String languageCode,
ObjectStream<SentenceSample> samples,
SentenceDetectorFactory sdFactory,
TrainingParameters mlParams)
throws IOException
IOException
@Deprecated
public static SentenceModel train(String languageCode,
ObjectStream<SentenceSample> samples,
boolean useTokenEnd,
Dictionary abbreviations,
int cutoff,
int iterations)
throws IOException
train(String, ObjectStream, SentenceDetectorFactory, TrainingParameters)
and pass in af SentenceDetectorFactory.
IOException
public static SentenceModel train(String languageCode,
ObjectStream<SentenceSample> samples,
boolean useTokenEnd,
Dictionary abbreviations)
throws IOException
train(String, ObjectStream, SentenceDetectorFactory, TrainingParameters)
and pass in af SentenceDetectorFactory.
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||