Class LanguageToolAnalyzer

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

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.ReuseStrategy, org.apache.lucene.analysis.Analyzer.TokenStreamComponents
  • Field Summary

    Fields inherited from class org.apache.lucene.analysis.Analyzer

    GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY
  • Constructor Summary

    Constructors
    Constructor
    Description
    LanguageToolAnalyzer(JLanguageTool languageTool, boolean toLowerCase)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents
     

    Methods inherited from class org.apache.lucene.analysis.Analyzer

    close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, getVersion, initReader, setVersion, tokenStream, tokenStream

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LanguageToolAnalyzer

      public LanguageToolAnalyzer(JLanguageTool languageTool, boolean toLowerCase)
  • Method Details

    • createComponents

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