Enum SimilarityMethod

  • All Implemented Interfaces:
    com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, java.io.Serializable, java.lang.Comparable<SimilarityMethod>

    public enum SimilarityMethod
    extends java.lang.Enum<SimilarityMethod>
    implements com.google.protobuf.ProtocolMessageEnum
     Possible methods to compute the similarity between two vectors.
     
    Protobuf enum arg_services.nlp.v1.SimilarityMethod
    • Enum Constant Detail

      • SIMILARITY_METHOD_UNSPECIFIED

        public static final SimilarityMethod SIMILARITY_METHOD_UNSPECIFIED
         If not given, the implementation defaults to cosine similarity.
         
        SIMILARITY_METHOD_UNSPECIFIED = 0;
      • SIMILARITY_METHOD_COSINE

        public static final SimilarityMethod SIMILARITY_METHOD_COSINE
         Cosine similarity. [Wikipedia](https://en.wikipedia.org/wiki/Cosine_similarity).
         
        SIMILARITY_METHOD_COSINE = 1;
      • SIMILARITY_METHOD_DYNAMAX_JACCARD

        public static final SimilarityMethod SIMILARITY_METHOD_DYNAMAX_JACCARD
         DynaMax Jaccard. [Paper](https://arxiv.org/abs/1904.13264), [Code](https://github.com/babylonhealth/fuzzymax/blob/master/similarity/fuzzy.py).
         
        SIMILARITY_METHOD_DYNAMAX_JACCARD = 2;
      • SIMILARITY_METHOD_MAXPOOL_JACCARD

        public static final SimilarityMethod SIMILARITY_METHOD_MAXPOOL_JACCARD
         MaxPool Jaccard. [Paper](https://arxiv.org/abs/1904.13264), [Code](https://github.com/babylonhealth/fuzzymax/blob/master/similarity/fuzzy.py).
         
        SIMILARITY_METHOD_MAXPOOL_JACCARD = 3;
      • SIMILARITY_METHOD_DYNAMAX_DICE

        public static final SimilarityMethod SIMILARITY_METHOD_DYNAMAX_DICE
         DynaMax Dice. [Paper](https://arxiv.org/abs/1904.13264), [Code](https://github.com/babylonhealth/fuzzymax/blob/master/similarity/fuzzy.py).
         
        SIMILARITY_METHOD_DYNAMAX_DICE = 4;
      • SIMILARITY_METHOD_DYNAMAX_OTSUKA

        public static final SimilarityMethod SIMILARITY_METHOD_DYNAMAX_OTSUKA
         DynaMax Otsuka. [Paper](https://arxiv.org/abs/1904.13264), [Code](https://github.com/babylonhealth/fuzzymax/blob/master/similarity/fuzzy.py).
         
        SIMILARITY_METHOD_DYNAMAX_OTSUKA = 5;
      • SIMILARITY_METHOD_WMD

        public static final SimilarityMethod SIMILARITY_METHOD_WMD
         Word Mover's Distance [Gensim Tutorial](https://radimrehurek.com/gensim/auto_examples/tutorials/run_wmd.html).
         
        SIMILARITY_METHOD_WMD = 6;
      • SIMILARITY_METHOD_EDIT

        public static final SimilarityMethod SIMILARITY_METHOD_EDIT
         Levenshtein distance. [Wikipedia](https://en.wikipedia.org/wiki/Levenshtein_distance).
         
        SIMILARITY_METHOD_EDIT = 7;
      • SIMILARITY_METHOD_JACCARD

        public static final SimilarityMethod SIMILARITY_METHOD_JACCARD
         Jaccard similarity. [Wikipedia](https://en.wikipedia.org/wiki/Jaccard_index).
         
        SIMILARITY_METHOD_JACCARD = 8;
      • SIMILARITY_METHOD_ANGULAR

        public static final SimilarityMethod SIMILARITY_METHOD_ANGULAR
         Angular distance. [Wikipedia](https://en.wikipedia.org/wiki/Angular_distance).
         
        SIMILARITY_METHOD_ANGULAR = 9;
    • Field Detail

      • SIMILARITY_METHOD_UNSPECIFIED_VALUE

        public static final int SIMILARITY_METHOD_UNSPECIFIED_VALUE
         If not given, the implementation defaults to cosine similarity.
         
        SIMILARITY_METHOD_UNSPECIFIED = 0;
        See Also:
        Constant Field Values
      • SIMILARITY_METHOD_COSINE_VALUE

        public static final int SIMILARITY_METHOD_COSINE_VALUE
         Cosine similarity. [Wikipedia](https://en.wikipedia.org/wiki/Cosine_similarity).
         
        SIMILARITY_METHOD_COSINE = 1;
        See Also:
        Constant Field Values
      • SIMILARITY_METHOD_DYNAMAX_JACCARD_VALUE

        public static final int SIMILARITY_METHOD_DYNAMAX_JACCARD_VALUE
         DynaMax Jaccard. [Paper](https://arxiv.org/abs/1904.13264), [Code](https://github.com/babylonhealth/fuzzymax/blob/master/similarity/fuzzy.py).
         
        SIMILARITY_METHOD_DYNAMAX_JACCARD = 2;
        See Also:
        Constant Field Values
      • SIMILARITY_METHOD_MAXPOOL_JACCARD_VALUE

        public static final int SIMILARITY_METHOD_MAXPOOL_JACCARD_VALUE
         MaxPool Jaccard. [Paper](https://arxiv.org/abs/1904.13264), [Code](https://github.com/babylonhealth/fuzzymax/blob/master/similarity/fuzzy.py).
         
        SIMILARITY_METHOD_MAXPOOL_JACCARD = 3;
        See Also:
        Constant Field Values
      • SIMILARITY_METHOD_DYNAMAX_DICE_VALUE

        public static final int SIMILARITY_METHOD_DYNAMAX_DICE_VALUE
         DynaMax Dice. [Paper](https://arxiv.org/abs/1904.13264), [Code](https://github.com/babylonhealth/fuzzymax/blob/master/similarity/fuzzy.py).
         
        SIMILARITY_METHOD_DYNAMAX_DICE = 4;
        See Also:
        Constant Field Values
      • SIMILARITY_METHOD_DYNAMAX_OTSUKA_VALUE

        public static final int SIMILARITY_METHOD_DYNAMAX_OTSUKA_VALUE
         DynaMax Otsuka. [Paper](https://arxiv.org/abs/1904.13264), [Code](https://github.com/babylonhealth/fuzzymax/blob/master/similarity/fuzzy.py).
         
        SIMILARITY_METHOD_DYNAMAX_OTSUKA = 5;
        See Also:
        Constant Field Values
      • SIMILARITY_METHOD_WMD_VALUE

        public static final int SIMILARITY_METHOD_WMD_VALUE
         Word Mover's Distance [Gensim Tutorial](https://radimrehurek.com/gensim/auto_examples/tutorials/run_wmd.html).
         
        SIMILARITY_METHOD_WMD = 6;
        See Also:
        Constant Field Values
      • SIMILARITY_METHOD_EDIT_VALUE

        public static final int SIMILARITY_METHOD_EDIT_VALUE
         Levenshtein distance. [Wikipedia](https://en.wikipedia.org/wiki/Levenshtein_distance).
         
        SIMILARITY_METHOD_EDIT = 7;
        See Also:
        Constant Field Values
      • SIMILARITY_METHOD_JACCARD_VALUE

        public static final int SIMILARITY_METHOD_JACCARD_VALUE
         Jaccard similarity. [Wikipedia](https://en.wikipedia.org/wiki/Jaccard_index).
         
        SIMILARITY_METHOD_JACCARD = 8;
        See Also:
        Constant Field Values
      • SIMILARITY_METHOD_ANGULAR_VALUE

        public static final int SIMILARITY_METHOD_ANGULAR_VALUE
         Angular distance. [Wikipedia](https://en.wikipedia.org/wiki/Angular_distance).
         
        SIMILARITY_METHOD_ANGULAR = 9;
        See Also:
        Constant Field Values
    • Method Detail

      • values

        public static SimilarityMethod[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SimilarityMethod c : SimilarityMethod.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SimilarityMethod valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getNumber

        public final int getNumber()
        Specified by:
        getNumber in interface com.google.protobuf.Internal.EnumLite
        Specified by:
        getNumber in interface com.google.protobuf.ProtocolMessageEnum
      • valueOf

        @Deprecated
        public static SimilarityMethod valueOf​(int value)
        Deprecated.
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        value - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • forNumber

        public static SimilarityMethod forNumber​(int value)
        Parameters:
        value - The numeric wire value of the corresponding enum entry.
        Returns:
        The enum associated with the given numeric wire value.
      • internalGetValueMap

        public static com.google.protobuf.Internal.EnumLiteMap<SimilarityMethod> internalGetValueMap()
      • getValueDescriptor

        public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
        Specified by:
        getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
      • getDescriptorForType

        public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
      • getDescriptor

        public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
      • valueOf

        public static SimilarityMethod valueOf​(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        desc - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null