org.apache.stanbol.commons.opennlp
Class TextAnalyzer

java.lang.Object
  extended by org.apache.stanbol.commons.opennlp.TextAnalyzer

Deprecated. replaced by STANBOL-733 (stanbol nlp processing module

public class TextAnalyzer
extends Object


Nested Class Summary
 class TextAnalyzer.AnalysedText
          Deprecated. replaced by STANBOL-733 (stanbol nlp processing module
static class TextAnalyzer.TextAnalyzerConfig
          Deprecated. replaced by STANBOL-733 (stanbol nlp processing module
 
Constructor Summary
TextAnalyzer(OpenNLP openNLP, String language)
          Deprecated. Creates a TextAnalyzer based on the OpenNLP and the given language and the default configuration.
TextAnalyzer(OpenNLP openNLP, String language, TextAnalyzer.TextAnalyzerConfig config)
          Deprecated. Creates a TextAnalyzer based on the OpenNLP and the given language.
 
Method Summary
 Iterator<TextAnalyzer.AnalysedText> analyse(String text)
          Deprecated. Analyses sentence by sentence when Iterator.next() is called on the returned Iterator.
 TextAnalyzer.AnalysedText analyseSentence(String sentence)
          Deprecated. Analyses the parsed text in a single chunk.
protected  opennlp.tools.chunker.ChunkerME getChunker()
          Deprecated.  
 TextAnalyzer.TextAnalyzerConfig getConfig()
          Deprecated.  
 String getLanguage()
          Deprecated.  
 OpenNLP getOpenNLP()
          Deprecated.  
protected  opennlp.tools.postag.POSTaggerME getPosTagger()
          Deprecated.  
protected  PosTypeChunker getPosTypeChunker()
          Deprecated.  
protected  opennlp.tools.sentdetect.SentenceDetector getSentenceDetector()
          Deprecated.  
 opennlp.tools.tokenize.Tokenizer getTokenizer()
          Deprecated. Getter for the Tokenizer of a given language
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextAnalyzer

public TextAnalyzer(OpenNLP openNLP,
                    String language)
Deprecated. 
Creates a TextAnalyzer based on the OpenNLP and the given language and the default configuration.

If null is parsed as language, than a minimal configuration that tokenizes the text using the SimpleTokenizer is used.

Parameters:
openNLP - The openNLP configuration to be used to analyze the text
language - the language or null if not known.

TextAnalyzer

public TextAnalyzer(OpenNLP openNLP,
                    String language,
                    TextAnalyzer.TextAnalyzerConfig config)
Deprecated. 
Creates a TextAnalyzer based on the OpenNLP and the given language.

If null is parsed as language, than a minimal configuration that tokenizes the text using the SimpleTokenizer is used.

Parameters:
openNLP - The openNLP configuration to be used to analyze the text
language - the language or null if not known.
Method Detail

getPosTagger

protected final opennlp.tools.postag.POSTaggerME getPosTagger()
Deprecated. 

getTokenizer

public final opennlp.tools.tokenize.Tokenizer getTokenizer()
Deprecated. 
Getter for the Tokenizer of a given language

Parameters:
language - the language
Returns:
the Tolenizer

getChunker

protected final opennlp.tools.chunker.ChunkerME getChunker()
Deprecated. 

getPosTypeChunker

protected final PosTypeChunker getPosTypeChunker()
Deprecated. 

getSentenceDetector

protected final opennlp.tools.sentdetect.SentenceDetector getSentenceDetector()
Deprecated. 

getOpenNLP

public final OpenNLP getOpenNLP()
Deprecated. 

getConfig

public final TextAnalyzer.TextAnalyzerConfig getConfig()
Deprecated. 
Returns:
the config

getLanguage

public final String getLanguage()
Deprecated. 
Returns:
the language

analyseSentence

public TextAnalyzer.AnalysedText analyseSentence(String sentence)
Deprecated. 
Analyses the parsed text in a single chunk. No sentence detector is used

Parameters:
sentence - the sentence (text) to analyse
Returns:
the Analysed text

analyse

public Iterator<TextAnalyzer.AnalysedText> analyse(String text)
Deprecated. 
Analyses sentence by sentence when Iterator.next() is called on the returned Iterator. Changes to the configuration of this class will have an effect on the analysis results of this iterator.

if no sentence detector is available the whole text is parsed at once.

Parameters:
text - The text to analyse
Returns:
Iterator the analyses the parsed text sentence by sentence on calls to Iterator.next().


Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.