All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.cloudsearch.model.AnalysisOptions.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.cloudsearch.model



/**
 * Synonyms, stopwords, and stemming options for an analysis scheme. Includes tokenization dictionary for Japanese.
 */
public class AnalysisOptions private constructor(builder: Builder) {
    /**
     * The level of algorithmic stemming to perform: `none`, `minimal`, `light`, or `full`. The available levels vary depending on the language. For more information, see [Language Specific Text Processing Settings](http://docs.aws.amazon.com/cloudsearch/latest/developerguide/text-processing.html#text-processing-settings) in the *Amazon CloudSearch Developer Guide*
     */
    public val algorithmicStemming: aws.sdk.kotlin.services.cloudsearch.model.AlgorithmicStemming? = builder.algorithmicStemming
    /**
     * A JSON array that contains a collection of terms, tokens, readings and part of speech for Japanese Tokenizaiton. The Japanese tokenization dictionary enables you to override the default tokenization for selected terms. This is only valid for Japanese language fields.
     */
    public val japaneseTokenizationDictionary: kotlin.String? = builder.japaneseTokenizationDictionary
    /**
     * A JSON object that contains a collection of string:value pairs that each map a term to its stem. For example, `{"term1": "stem1", "term2": "stem2", "term3": "stem3"}`. The stemming dictionary is applied in addition to any algorithmic stemming. This enables you to override the results of the algorithmic stemming to correct specific cases of overstemming or understemming. The maximum size of a stemming dictionary is 500 KB.
     */
    public val stemmingDictionary: kotlin.String? = builder.stemmingDictionary
    /**
     * A JSON array of terms to ignore during indexing and searching. For example, `["a", "an", "the", "of"]`. The stopwords dictionary must explicitly list each word you want to ignore. Wildcards and regular expressions are not supported.
     */
    public val stopwords: kotlin.String? = builder.stopwords
    /**
     * A JSON object that defines synonym groups and aliases. A synonym group is an array of arrays, where each sub-array is a group of terms where each term in the group is considered a synonym of every other term in the group. The aliases value is an object that contains a collection of string:value pairs where the string specifies a term and the array of values specifies each of the aliases for that term. An alias is considered a synonym of the specified term, but the term is not considered a synonym of the alias. For more information about specifying synonyms, see [Synonyms](http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-analysis-schemes.html#synonyms) in the *Amazon CloudSearch Developer Guide*.
     */
    public val synonyms: kotlin.String? = builder.synonyms

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudsearch.model.AnalysisOptions = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("AnalysisOptions(")
        append("algorithmicStemming=$algorithmicStemming,")
        append("japaneseTokenizationDictionary=$japaneseTokenizationDictionary,")
        append("stemmingDictionary=$stemmingDictionary,")
        append("stopwords=$stopwords,")
        append("synonyms=$synonyms")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = algorithmicStemming?.hashCode() ?: 0
        result = 31 * result + (japaneseTokenizationDictionary?.hashCode() ?: 0)
        result = 31 * result + (stemmingDictionary?.hashCode() ?: 0)
        result = 31 * result + (stopwords?.hashCode() ?: 0)
        result = 31 * result + (synonyms?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as AnalysisOptions

        if (algorithmicStemming != other.algorithmicStemming) return false
        if (japaneseTokenizationDictionary != other.japaneseTokenizationDictionary) return false
        if (stemmingDictionary != other.stemmingDictionary) return false
        if (stopwords != other.stopwords) return false
        if (synonyms != other.synonyms) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudsearch.model.AnalysisOptions = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The level of algorithmic stemming to perform: `none`, `minimal`, `light`, or `full`. The available levels vary depending on the language. For more information, see [Language Specific Text Processing Settings](http://docs.aws.amazon.com/cloudsearch/latest/developerguide/text-processing.html#text-processing-settings) in the *Amazon CloudSearch Developer Guide*
         */
        public var algorithmicStemming: aws.sdk.kotlin.services.cloudsearch.model.AlgorithmicStemming? = null
        /**
         * A JSON array that contains a collection of terms, tokens, readings and part of speech for Japanese Tokenizaiton. The Japanese tokenization dictionary enables you to override the default tokenization for selected terms. This is only valid for Japanese language fields.
         */
        public var japaneseTokenizationDictionary: kotlin.String? = null
        /**
         * A JSON object that contains a collection of string:value pairs that each map a term to its stem. For example, `{"term1": "stem1", "term2": "stem2", "term3": "stem3"}`. The stemming dictionary is applied in addition to any algorithmic stemming. This enables you to override the results of the algorithmic stemming to correct specific cases of overstemming or understemming. The maximum size of a stemming dictionary is 500 KB.
         */
        public var stemmingDictionary: kotlin.String? = null
        /**
         * A JSON array of terms to ignore during indexing and searching. For example, `["a", "an", "the", "of"]`. The stopwords dictionary must explicitly list each word you want to ignore. Wildcards and regular expressions are not supported.
         */
        public var stopwords: kotlin.String? = null
        /**
         * A JSON object that defines synonym groups and aliases. A synonym group is an array of arrays, where each sub-array is a group of terms where each term in the group is considered a synonym of every other term in the group. The aliases value is an object that contains a collection of string:value pairs where the string specifies a term and the array of values specifies each of the aliases for that term. An alias is considered a synonym of the specified term, but the term is not considered a synonym of the alias. For more information about specifying synonyms, see [Synonyms](http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-analysis-schemes.html#synonyms) in the *Amazon CloudSearch Developer Guide*.
         */
        public var synonyms: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudsearch.model.AnalysisOptions) : this() {
            this.algorithmicStemming = x.algorithmicStemming
            this.japaneseTokenizationDictionary = x.japaneseTokenizationDictionary
            this.stemmingDictionary = x.stemmingDictionary
            this.stopwords = x.stopwords
            this.synonyms = x.synonyms
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.cloudsearch.model.AnalysisOptions = AnalysisOptions(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy