Class MicrosoftLanguageTokenizer


  • public final class MicrosoftLanguageTokenizer
    extends LexicalTokenizer
    Divides text using language-specific rules.
    • Constructor Detail

      • MicrosoftLanguageTokenizer

        public MicrosoftLanguageTokenizer​(String name)
        Parameters:
        name - The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters.
    • Method Detail

      • getMaxTokenLength

        public Integer getMaxTokenLength()
        Get the maxTokenLength property: The maximum token length. Tokens longer than the maximum length are split. Maximum token length that can be used is 300 characters. Tokens longer than 300 characters are first split into tokens of length 300 and then each of those tokens is split based on the max token length set. Default is 255.
        Returns:
        the maxTokenLength value.
      • setMaxTokenLength

        public MicrosoftLanguageTokenizer setMaxTokenLength​(Integer maxTokenLength)
        Set the maxTokenLength property: The maximum token length. Tokens longer than the maximum length are split. Maximum token length that can be used is 300 characters. Tokens longer than 300 characters are first split into tokens of length 300 and then each of those tokens is split based on the max token length set. Default is 255.
        Parameters:
        maxTokenLength - the maxTokenLength value to set.
        Returns:
        the MicrosoftLanguageTokenizer object itself.
      • isSearchTokenizer

        public Boolean isSearchTokenizer()
        Get the isSearchTokenizer property: A value indicating how the tokenizer is used. Set to true if used as the search tokenizer, set to false if used as the indexing tokenizer. Default is false.
        Returns:
        the isSearchTokenizer value.
      • setIsSearchTokenizer

        public MicrosoftLanguageTokenizer setIsSearchTokenizer​(Boolean isSearchTokenizer)
        Set the isSearchTokenizer property: A value indicating how the tokenizer is used. Set to true if used as the search tokenizer, set to false if used as the indexing tokenizer. Default is false.
        Parameters:
        isSearchTokenizer - the isSearchTokenizer value to set.
        Returns:
        the MicrosoftLanguageTokenizer object itself.
      • getLanguage

        public MicrosoftTokenizerLanguage getLanguage()
        Get the language property: The language to use. The default is English. Possible values include: 'Bangla', 'Bulgarian', 'Catalan', 'ChineseSimplified', 'ChineseTraditional', 'Croatian', 'Czech', 'Danish', 'Dutch', 'English', 'French', 'German', 'Greek', 'Gujarati', 'Hindi', 'Icelandic', 'Indonesian', 'Italian', 'Japanese', 'Kannada', 'Korean', 'Malay', 'Malayalam', 'Marathi', 'NorwegianBokmaal', 'Polish', 'Portuguese', 'PortugueseBrazilian', 'Punjabi', 'Romanian', 'Russian', 'SerbianCyrillic', 'SerbianLatin', 'Slovenian', 'Spanish', 'Swedish', 'Tamil', 'Telugu', 'Thai', 'Ukrainian', 'Urdu', 'Vietnamese'.
        Returns:
        the language value.
      • setLanguage

        public MicrosoftLanguageTokenizer setLanguage​(MicrosoftTokenizerLanguage language)
        Set the language property: The language to use. The default is English. Possible values include: 'Bangla', 'Bulgarian', 'Catalan', 'ChineseSimplified', 'ChineseTraditional', 'Croatian', 'Czech', 'Danish', 'Dutch', 'English', 'French', 'German', 'Greek', 'Gujarati', 'Hindi', 'Icelandic', 'Indonesian', 'Italian', 'Japanese', 'Kannada', 'Korean', 'Malay', 'Malayalam', 'Marathi', 'NorwegianBokmaal', 'Polish', 'Portuguese', 'PortugueseBrazilian', 'Punjabi', 'Romanian', 'Russian', 'SerbianCyrillic', 'SerbianLatin', 'Slovenian', 'Spanish', 'Swedish', 'Tamil', 'Telugu', 'Thai', 'Ukrainian', 'Urdu', 'Vietnamese'.
        Parameters:
        language - the language value to set.
        Returns:
        the MicrosoftLanguageTokenizer object itself.