Enum Class SimilarityMethod
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,Serializable,Comparable<SimilarityMethod>,Constable
public enum SimilarityMethod
extends Enum<SimilarityMethod>
implements com.google.protobuf.ProtocolMessageEnum
Possible methods to compute the similarity between two vectors.Protobuf enum
arg_services.nlp.v1.SimilarityMethod-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAngular distance.Cosine similarity.DynaMax Dice.DynaMax Jaccard.DynaMax Otsuka.Levenshtein distance.Jaccard similarity.MaxPool Jaccard.If not given, the implementation defaults to cosine similarity.Word Mover's Distance [Gensim Tutorial](https://radimrehurek.com/gensim/auto_examples/tutorials/run_wmd.html). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAngular distance.static final intCosine similarity.static final intDynaMax Dice.static final intDynaMax Jaccard.static final intDynaMax Otsuka.static final intLevenshtein distance.static final intJaccard similarity.static final intMaxPool Jaccard.static final intIf not given, the implementation defaults to cosine similarity.static final intWord Mover's Distance [Gensim Tutorial](https://radimrehurek.com/gensim/auto_examples/tutorials/run_wmd.html). -
Method Summary
Modifier and TypeMethodDescriptionstatic SimilarityMethodforNumber(int value) static final com.google.protobuf.Descriptors.EnumDescriptorfinal com.google.protobuf.Descriptors.EnumDescriptorfinal intfinal com.google.protobuf.Descriptors.EnumValueDescriptorstatic com.google.protobuf.Internal.EnumLiteMap<SimilarityMethod>static SimilarityMethodvalueOf(int value) Deprecated.static SimilarityMethodvalueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this class with the specified name.static SimilarityMethodReturns the enum constant of this class with the specified name.static SimilarityMethod[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SIMILARITY_METHOD_UNSPECIFIED
If not given, the implementation defaults to cosine similarity.
SIMILARITY_METHOD_UNSPECIFIED = 0; -
SIMILARITY_METHOD_COSINE
Cosine similarity. [Wikipedia](https://en.wikipedia.org/wiki/Cosine_similarity).
SIMILARITY_METHOD_COSINE = 1; -
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
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
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
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
Word Mover's Distance [Gensim Tutorial](https://radimrehurek.com/gensim/auto_examples/tutorials/run_wmd.html).
SIMILARITY_METHOD_WMD = 6; -
SIMILARITY_METHOD_EDIT
Levenshtein distance. [Wikipedia](https://en.wikipedia.org/wiki/Levenshtein_distance).
SIMILARITY_METHOD_EDIT = 7; -
SIMILARITY_METHOD_JACCARD
Jaccard similarity. [Wikipedia](https://en.wikipedia.org/wiki/Jaccard_index).
SIMILARITY_METHOD_JACCARD = 8; -
SIMILARITY_METHOD_ANGULAR
Angular distance. [Wikipedia](https://en.wikipedia.org/wiki/Angular_distance).
SIMILARITY_METHOD_ANGULAR = 9; -
UNRECOGNIZED
-
-
Field Details
-
SIMILARITY_METHOD_UNSPECIFIED_VALUE
public static final int SIMILARITY_METHOD_UNSPECIFIED_VALUEIf not given, the implementation defaults to cosine similarity.
SIMILARITY_METHOD_UNSPECIFIED = 0;- See Also:
-
SIMILARITY_METHOD_COSINE_VALUE
public static final int SIMILARITY_METHOD_COSINE_VALUECosine similarity. [Wikipedia](https://en.wikipedia.org/wiki/Cosine_similarity).
SIMILARITY_METHOD_COSINE = 1;- See Also:
-
SIMILARITY_METHOD_DYNAMAX_JACCARD_VALUE
public static final int SIMILARITY_METHOD_DYNAMAX_JACCARD_VALUEDynaMax 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:
-
SIMILARITY_METHOD_MAXPOOL_JACCARD_VALUE
public static final int SIMILARITY_METHOD_MAXPOOL_JACCARD_VALUEMaxPool 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:
-
SIMILARITY_METHOD_DYNAMAX_DICE_VALUE
public static final int SIMILARITY_METHOD_DYNAMAX_DICE_VALUEDynaMax 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:
-
SIMILARITY_METHOD_DYNAMAX_OTSUKA_VALUE
public static final int SIMILARITY_METHOD_DYNAMAX_OTSUKA_VALUEDynaMax 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:
-
SIMILARITY_METHOD_WMD_VALUE
public static final int SIMILARITY_METHOD_WMD_VALUEWord Mover's Distance [Gensim Tutorial](https://radimrehurek.com/gensim/auto_examples/tutorials/run_wmd.html).
SIMILARITY_METHOD_WMD = 6;- See Also:
-
SIMILARITY_METHOD_EDIT_VALUE
public static final int SIMILARITY_METHOD_EDIT_VALUELevenshtein distance. [Wikipedia](https://en.wikipedia.org/wiki/Levenshtein_distance).
SIMILARITY_METHOD_EDIT = 7;- See Also:
-
SIMILARITY_METHOD_JACCARD_VALUE
public static final int SIMILARITY_METHOD_JACCARD_VALUEJaccard similarity. [Wikipedia](https://en.wikipedia.org/wiki/Jaccard_index).
SIMILARITY_METHOD_JACCARD = 8;- See Also:
-
SIMILARITY_METHOD_ANGULAR_VALUE
public static final int SIMILARITY_METHOD_ANGULAR_VALUEAngular distance. [Wikipedia](https://en.wikipedia.org/wiki/Angular_distance).
SIMILARITY_METHOD_ANGULAR = 9;- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getNumber
public final int getNumber()- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
Deprecated.Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
forNumber
- Parameters:
value- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
-
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()- Specified by:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() -
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-