org.cogroo.analyzer
Class SentenceDetector
java.lang.Object
org.cogroo.analyzer.SentenceDetector
- All Implemented Interfaces:
- Analyzer
public class SentenceDetector
- extends Object
- implements Analyzer
The SentenceDetector
class gets all the sentences in the document text and store them in a list of sentences.
Constructor Summary |
SentenceDetector(opennlp.tools.sentdetect.SentenceDetectorME sentenceDetector)
|
Method Summary |
void |
analyze(Document document)
Analyzes part of a text or a word. |
SentenceDetector
public SentenceDetector(opennlp.tools.sentdetect.SentenceDetectorME sentenceDetector)
analyze
public void analyze(Document document)
- Description copied from interface:
Analyzer
- Analyzes part of a text or a word.
For example, it can search all the
sentences in the text or tag every word in a sentence.
- Specified by:
analyze
in interface Analyzer
- Parameters:
document
- contains the whole text given by the user. After an analysis it can store the text's sentences, words or its tags.
- Throws:
IllegalArgumentException
- if document text is null.
Copyright © 2012-2013 CoGrOO. All Rights Reserved.