Interface SMStringCosine

All Superinterfaces:
SimilarityMeasure, SMString
All Known Implementing Classes:
SMStringCosineImpl

public interface SMStringCosine extends SMString
Measures the Cosine similarity of two vectors of an inner product space and compares the angle between them. For further explanation about the Cosine Similarity, refer to http://en.wikipedia.org/wiki/Cosine_similarity.

The comparison can be case sensitive or insensitive. The delimiter can be defined by a Regex, the default is a space character.

Author:
Tobias Dahlem
  • Field Details

    • NAME

      static final String NAME
      Name of similarity measure is "StringCosine".
      See Also:
    • DEFAULT_DELIMITER

      static final String DEFAULT_DELIMITER
      The default delimiter value is " ".
      See Also:
    • DEFAULT_CASE_SENSITIVE

      static final boolean DEFAULT_CASE_SENSITIVE
      The default value for case sensitive is true.
      See Also:
  • Method Details

    • getDelimiter

      String getDelimiter()
    • setDelimiter

      void setDelimiter(String delimiter)
    • isCaseSensitive

      boolean isCaseSensitive()
    • setCaseInsensitive

      void setCaseInsensitive()
    • setCaseSensitive

      void setCaseSensitive()