本文整理汇总了Java中opennlp.tools.sentdetect.SentenceDetector类的典型用法代码示例。如果您正苦于以下问题:Java SentenceDetector类的具体用法?Java SentenceDetector怎么用?Java SentenceDetector使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SentenceDetector类属于opennlp.tools.sentdetect包,在下文中一共展示了SentenceDetector类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: OpenNLPTokenizer
import opennlp.tools.sentdetect.SentenceDetector; //导入依赖的package包/类
public OpenNLPTokenizer(AttributeFactory factory, SentenceDetector sentenceOp,
opennlp.tools.tokenize.Tokenizer tokenizerOp) {
super(factory);
termAtt.resizeBuffer(DEFAULT_BUFFER_SIZE);
if (sentenceOp == null && tokenizerOp == null) {
throw new IllegalArgumentException("OpenNLPTokenizer: need one or both of Sentence Detector and Tokenizer");
}
this.sentenceOp = sentenceOp;
this.tokenizerOp = tokenizerOp;
}
示例2: getSentenceDetector
import opennlp.tools.sentdetect.SentenceDetector; //导入依赖的package包/类
/** Obtain a reference to an english sentence detector to use in conjunction
* with the NameFinders
*/
public SentenceDetector getSentenceDetector() {
return detector;
}
示例3: SentenceTokenizer
import opennlp.tools.sentdetect.SentenceDetector; //导入依赖的package包/类
public SentenceTokenizer(AttributeFactory factory, SentenceDetector detector) {
super(factory);
this.detector = detector;
}
示例4: getSentenceSplitter
import opennlp.tools.sentdetect.SentenceDetector; //导入依赖的package包/类
public SentenceDetector getSentenceSplitter() {
return _sentDetect;
}