Documentation of 'com.datumbox.framework.core.common.text.analyzers.TextSimilarity' Java class
TextSimilarity
com.datumbox.framework.core.common.text.analyzers

Class TextSimilarity



  • public class TextSimilarity
    extends java.lang.Object
    The TextSimilarity class provides methods that estimate the similarity of two different strings.
    • Constructor Summary

      Constructors 
      Constructor and Description
      TextSimilarity() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static double oliverSimilarity(java.lang.String text1, java.lang.String text2)
      This calculates the similarity between two strings as described in Programming Classics: Implementing the World's Best Algorithms by Oliver (ISBN 0-131-00413-1).
      static double shinglerSimilarity(java.lang.String text1, java.lang.String text2, int w)
      Estimates the w-shingler similarity between two texts.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TextSimilarity

        public TextSimilarity()
    • Method Detail

      • oliverSimilarity

        public static double oliverSimilarity(java.lang.String text1,
                                              java.lang.String text2)
        This calculates the similarity between two strings as described in Programming Classics: Implementing the World's Best Algorithms by Oliver (ISBN 0-131-00413-1).
        Parameters:
        text1 -
        text2 -
        Returns:
      • shinglerSimilarity

        public static double shinglerSimilarity(java.lang.String text1,
                                                java.lang.String text2,
                                                int w)
        Estimates the w-shingler similarity between two texts. The w is the number of word sequences that are used for the estimation. References: http://phpir.com/shingling-near-duplicate-detection http://www.std.org/~msm/common/clustering.html
        Parameters:
        text1 -
        text2 -
        w -
        Returns:

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.