Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.cloudsearchv2.model;
 

Synonyms, stopwords, and stemming options for an analysis scheme. Includes tokenization dictionary for Japanese.

 
 public class AnalysisOptions implements SerializableCloneable {

    
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 in the Amazon CloudSearch Developer Guide.
 
     private String synonyms;

    
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.
 
     private String stopwords;

    
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.
 
     private String stemmingDictionary;

    
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.
 
     private String japaneseTokenizationDictionary;

    
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 in the Amazon CloudSearch Developer Guide

Constraints:
Allowed Values: none, minimal, light, full

 
     private String algorithmicStemming;

    
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 in the Amazon CloudSearch Developer Guide.

Returns:
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 in the Amazon CloudSearch Developer Guide.
    public String getSynonyms() {
        return ;
    }
    
    
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 in the Amazon CloudSearch Developer Guide.

Parameters:
synonyms 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 in the Amazon CloudSearch Developer Guide.
    public void setSynonyms(String synonyms) {
        this. = synonyms;
    }
    
    
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 in the Amazon CloudSearch Developer Guide.

Returns a reference to this object so that method calls can be chained together.

Parameters:
synonyms 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 in the Amazon CloudSearch Developer Guide.
Returns:
A reference to this updated object so that method calls can be chained together.
    public AnalysisOptions withSynonyms(String synonyms) {
        this. = synonyms;
        return this;
    }

    
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.

Returns:
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 String getStopwords() {
        return ;
    }
    
    
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.

Parameters:
stopwords 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 void setStopwords(String stopwords) {
        this. = stopwords;
    }
    
    
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.

Returns a reference to this object so that method calls can be chained together.

Parameters:
stopwords 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.
Returns:
A reference to this updated object so that method calls can be chained together.
    public AnalysisOptions withStopwords(String stopwords) {
        this. = stopwords;
        return this;
    }

    
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.

Returns:
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 String getStemmingDictionary() {
        return ;
    }
    
    
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.

Parameters:
stemmingDictionary 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 void setStemmingDictionary(String stemmingDictionary) {
        this. = stemmingDictionary;
    }
    
    
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.

Returns a reference to this object so that method calls can be chained together.

Parameters:
stemmingDictionary 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.
Returns:
A reference to this updated object so that method calls can be chained together.
    public AnalysisOptions withStemmingDictionary(String stemmingDictionary) {
        this. = stemmingDictionary;
        return this;
    }

    
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.

Returns:
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.
        return ;
    }
    
    
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.

Parameters:
japaneseTokenizationDictionary 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 void setJapaneseTokenizationDictionary(String japaneseTokenizationDictionary) {
        this. = japaneseTokenizationDictionary;
    }
    
    
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.

Returns a reference to this object so that method calls can be chained together.

Parameters:
japaneseTokenizationDictionary 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.
Returns:
A reference to this updated object so that method calls can be chained together.
    public AnalysisOptions withJapaneseTokenizationDictionary(String japaneseTokenizationDictionary) {
        this. = japaneseTokenizationDictionary;
        return this;
    }

    
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 in the Amazon CloudSearch Developer Guide

Constraints:
Allowed Values: none, minimal, light, full

Returns:
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 in the Amazon CloudSearch Developer Guide
See also:
AlgorithmicStemming
    public String getAlgorithmicStemming() {
        return ;
    }
    
    
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 in the Amazon CloudSearch Developer Guide

Constraints:
Allowed Values: none, minimal, light, full

Parameters:
algorithmicStemming 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 in the Amazon CloudSearch Developer Guide
See also:
AlgorithmicStemming
    public void setAlgorithmicStemming(String algorithmicStemming) {
        this. = algorithmicStemming;
    }
    
    
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 in the Amazon CloudSearch Developer Guide

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: none, minimal, light, full

Parameters:
algorithmicStemming 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 in the Amazon CloudSearch Developer Guide
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
AlgorithmicStemming
    public AnalysisOptions withAlgorithmicStemming(String algorithmicStemming) {
        this. = algorithmicStemming;
        return this;
    }

    
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 in the Amazon CloudSearch Developer Guide

Constraints:
Allowed Values: none, minimal, light, full

Parameters:
algorithmicStemming 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 in the Amazon CloudSearch Developer Guide
See also:
AlgorithmicStemming
    public void setAlgorithmicStemming(AlgorithmicStemming algorithmicStemming) {
        this. = algorithmicStemming.toString();
    }
    
    
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 in the Amazon CloudSearch Developer Guide

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: none, minimal, light, full

Parameters:
algorithmicStemming 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 in the Amazon CloudSearch Developer Guide
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
AlgorithmicStemming
    public AnalysisOptions withAlgorithmicStemming(AlgorithmicStemming algorithmicStemming) {
        this. = algorithmicStemming.toString();
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getSynonyms() != nullsb.append("Synonyms: " + getSynonyms() + ",");
        if (getStopwords() != nullsb.append("Stopwords: " + getStopwords() + ",");
        if (getStemmingDictionary() != nullsb.append("StemmingDictionary: " + getStemmingDictionary() + ",");
        if (getJapaneseTokenizationDictionary() != nullsb.append("JapaneseTokenizationDictionary: " + getJapaneseTokenizationDictionary() + ",");
        if (getAlgorithmicStemming() != nullsb.append("AlgorithmicStemming: " + getAlgorithmicStemming() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getSynonyms() == null) ? 0 : getSynonyms().hashCode()); 
        hashCode = prime * hashCode + ((getStopwords() == null) ? 0 : getStopwords().hashCode()); 
        hashCode = prime * hashCode + ((getStemmingDictionary() == null) ? 0 : getStemmingDictionary().hashCode()); 
        hashCode = prime * hashCode + ((getJapaneseTokenizationDictionary() == null) ? 0 : getJapaneseTokenizationDictionary().hashCode()); 
        hashCode = prime * hashCode + ((getAlgorithmicStemming() == null) ? 0 : getAlgorithmicStemming().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof AnalysisOptions == falsereturn false;
        AnalysisOptions other = (AnalysisOptions)obj;
        
        if (other.getSynonyms() == null ^ this.getSynonyms() == nullreturn false;
        if (other.getSynonyms() != null && other.getSynonyms().equals(this.getSynonyms()) == falsereturn false
        if (other.getStopwords() == null ^ this.getStopwords() == nullreturn false;
        if (other.getStopwords() != null && other.getStopwords().equals(this.getStopwords()) == falsereturn false
        if (other.getStemmingDictionary() == null ^ this.getStemmingDictionary() == nullreturn false;
        if (other.getStemmingDictionary() != null && other.getStemmingDictionary().equals(this.getStemmingDictionary()) == falsereturn false
        if (other.getJapaneseTokenizationDictionary() == null ^ this.getJapaneseTokenizationDictionary() == nullreturn false;
        if (other.getJapaneseTokenizationDictionary() != null && other.getJapaneseTokenizationDictionary().equals(this.getJapaneseTokenizationDictionary()) == falsereturn false
        if (other.getAlgorithmicStemming() == null ^ this.getAlgorithmicStemming() == nullreturn false;
        if (other.getAlgorithmicStemming() != null && other.getAlgorithmicStemming().equals(this.getAlgorithmicStemming()) == falsereturn false
        return true;
    }
    
    @Override
    public AnalysisOptions clone() {
        try {
            return (AnalysisOptionssuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X