Class AnalyzeTextOptions


  • public final class AnalyzeTextOptions
    extends Object
    Specifies some text and analysis components used to break that text into tokens.
    • Constructor Detail

      • AnalyzeTextOptions

        public AnalyzeTextOptions​(String text,
                                  LexicalAnalyzerName analyzerName)
        Constructor to AnalyzeTextOptions which takes analyzerName.
        Parameters:
        text - The text break into tokens.
        analyzerName - The name of the analyzer to use to break the given text.
      • AnalyzeTextOptions

        public AnalyzeTextOptions​(String text,
                                  LexicalTokenizerName tokenizerName)
        Constructor to AnalyzeTextOptions which takes tokenizerName.
        Parameters:
        text - The text break into tokens.
        tokenizerName - The name of the tokenizer to use to break the given text.
      • AnalyzeTextOptions

        public AnalyzeTextOptions​(String text,
                                  LexicalNormalizerName normalizerName)
        Constructor to AnalyzeTextOptions which takes normalizerName.
        Parameters:
        text - The text break into tokens.
        normalizerName - The name of the normalizer to use to break the given text.
    • Method Detail

      • getText

        public String getText()
        Get the text property: The text to break into tokens.
        Returns:
        the text value.
      • getAnalyzerName

        public LexicalAnalyzerName getAnalyzerName()
        Get the analyzer name property: The name of the analyzer to use to break the given text.
        Returns:
        the analyzer value.
      • getTokenizerName

        public LexicalTokenizerName getTokenizerName()
        Get the tokenizer name property: The name of the tokenizer to use to break the given text.
        Returns:
        the tokenizer value.
      • getNormalizer

        public LexicalNormalizerName getNormalizer()
        Get the normalizer name property: The name of the normalizer to use to normalize the given text.
        Returns:
        the normalizer value.
      • getTokenFilters

        public List<TokenFilterName> getTokenFilters()
        Get the tokenFilters property: An optional list of token filters to use when breaking the given text.
        Returns:
        the tokenFilters value.
      • setTokenFilters

        public AnalyzeTextOptions setTokenFilters​(TokenFilterName... tokenFilters)
        Set the tokenFilters property: An optional list of token filters to use when breaking the given text.
        Parameters:
        tokenFilters - the tokenFilters value to set.
        Returns:
        the AnalyzeRequest object itself.
      • getCharFilters

        public List<CharFilterName> getCharFilters()
        Get the charFilters property: An optional list of character filters to use when breaking the given text.
        Returns:
        the charFilters value.
      • setCharFilters

        public AnalyzeTextOptions setCharFilters​(CharFilterName... charFilters)
        Set the charFilters property: An optional list of character filters to use when breaking the given text.
        Parameters:
        charFilters - the charFilters value to set.
        Returns:
        the AnalyzeRequest object itself.