Interface Analysis

  • All Known Implementing Classes:
    AnalysisImpl

    public interface Analysis
    A dedicated interface for Luke's Analysis tab.
    • Method Detail

      • 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