org.languagetool.dev.index
Class LanguageToolAnalyzer

java.lang.Object
  extended by org.apache.lucene.analysis.Analyzer
      extended by org.languagetool.dev.index.LanguageToolAnalyzer
All Implemented Interfaces:
Closeable

public final class LanguageToolAnalyzer
extends org.apache.lucene.analysis.Analyzer

LanguageToolAnalyzer emits the entire input (i.e. a sentence) as a single token by AnyCharTokenizer, and then use JLanguageTool to analyze and tag the tokens by LanguageToolFilter.

Author:
Tao Lin

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.analysis.Analyzer
org.apache.lucene.analysis.Analyzer.GlobalReuseStrategy, org.apache.lucene.analysis.Analyzer.PerFieldReuseStrategy, org.apache.lucene.analysis.Analyzer.ReuseStrategy, org.apache.lucene.analysis.Analyzer.TokenStreamComponents
 
Constructor Summary
LanguageToolAnalyzer(org.apache.lucene.util.Version matchVersion, JLanguageTool languageTool, boolean toLowerCase)
           
 
Method Summary
protected  org.apache.lucene.analysis.Analyzer.TokenStreamComponents createComponents(String s, Reader reader)
           
 
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, initReader, tokenStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LanguageToolAnalyzer

public LanguageToolAnalyzer(org.apache.lucene.util.Version matchVersion,
                            JLanguageTool languageTool,
                            boolean toLowerCase)
Method Detail

createComponents

protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents createComponents(String s,
                                                                                     Reader reader)
Specified by:
createComponents in class org.apache.lucene.analysis.Analyzer


Copyright © 2013. All Rights Reserved.