org.apache.lucene.luke.models.analysis

## Interface Analysis

- All Known Implementing Classes:
    AnalysisImpl

      public interface Analysis

  A dedicated interface for Luke's Analysis tab.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `Analysis.CharfilteredText` Holder for a charfilter name and text that output by the charfilter
    `static class` | `Analysis.NamedObject` Base class for named object
    `static class` | `Analysis.NamedTokens` Holder for a pair tokenizer/filter and token list
    `static class` | `Analysis.StepByStepResult` Step-by-step analysis result holder.
    `static class` | `Analysis.Token` Holder for a token.
    `static class` | `Analysis.TokenAttribute` Holder for a token attribute.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addExternalJars(List<String> jarFiles)` Adds external jar files to classpath and loads custom `CharFilterFactory`s, `TokenizerFactory`s, or `TokenFilterFactory`s.
    `List<Analysis.Token>` | `analyze(String text)` Analyzes given text with the current Analyzer.
    `Analysis.StepByStepResult` | `analyzeStepByStep(String text)` Analyzes given text with the current Analyzer.
    `Analyzer` | `buildCustomAnalyzer(CustomAnalyzerConfig config)` Creates new custom Analyzer instance with the given configurations.
    `Analyzer` | `createAnalyzerFromClassName(String analyzerType)` Creates new Analyzer instance for the specified class name.
    `Analyzer` | `currentAnalyzer()` Returns current analyzer.
    `Collection<String>` | `getAvailableCharFilters()` Returns available char filter names.
    `Collection<String>` | `getAvailableTokenFilters()` Returns available token filter names.
    `Collection<String>` | `getAvailableTokenizers()` Returns available tokenizer names.
    `Collection<Class<? extends Analyzer>>` | `getPresetAnalyzerTypes()` Returns built-in `Analyzer`s.

- - ### Method Detail

    - #### getPresetAnalyzerTypes

          Collection<Class<? extends Analyzer>> getPresetAnalyzerTypes()

      Returns built-in `Analyzer`s.

    - #### getAvailableCharFilters

          Collection<String> getAvailableCharFilters()

      Returns available char filter names.

    - #### getAvailableTokenizers

          Collection<String> getAvailableTokenizers()

      Returns available tokenizer names.

    - #### getAvailableTokenFilters

          Collection<String> getAvailableTokenFilters()

      Returns available token filter names.

    - #### createAnalyzerFromClassName

          Analyzer createAnalyzerFromClassName(String analyzerType)

      Creates new Analyzer instance for the specified class name.
      Parameters:
        `analyzerType` - - instantiable class name of an Analyzer
      Returns:
        new Analyzer instance
      Throws:
        `LukeException` - - if failed to create new Analyzer instance

    - #### buildCustomAnalyzer

          Analyzer buildCustomAnalyzer(CustomAnalyzerConfig config)

      Creates new custom Analyzer instance with the given configurations.
      Parameters:
        `config` - - custom analyzer configurations
      Returns:
        new Analyzer instance
      Throws:
        `LukeException` - - if failed to create new Analyzer instance

    - #### analyze

          List<Analysis.Token> analyze(String text)

      Analyzes given text with the current Analyzer.
      Parameters:
        `text` - - text string to analyze
      Returns:
        the list of token
      Throws:
        `LukeException` - - if an internal error occurs when analyzing text

    - #### currentAnalyzer

          Analyzer currentAnalyzer()

      Returns current analyzer.
      Throws:
        `LukeException` - - if current analyzer not set

    - #### addExternalJars

          void addExternalJars(List<String> jarFiles)

      Adds external jar files to classpath and loads custom `CharFilterFactory`s, `TokenizerFactory`s, or `TokenFilterFactory`s.
      Parameters:
        `jarFiles` - - list of paths to jar file
      Throws:
        `LukeException` - - if an internal error occurs when loading jars

    - #### analyzeStepByStep

          Analysis.StepByStepResult analyzeStepByStep(String text)

      Analyzes given text with the current Analyzer.
      Parameters:
        `text` - - text string to analyze
      Returns:
        the list of text by charfilter and the list of pair of Tokenizer/TokenFilter name and tokens

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.