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

Class PHPSimilarText



  • public class PHPSimilarText
    extends java.lang.Object
    Estimates the similarity of two strings. I ported from php's similar_text() method which is written in C and it's original code can be found on: http://stackoverflow.com/questions/14136349/how-does-similar-text-work
    • Constructor Summary

      Constructors 
      Constructor and Description
      PHPSimilarText() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static int similarityChars(java.lang.String txt1, java.lang.String txt2)
      Checks the similarity of two strings and returns the number of matching chars in both strings.
      static double similarityPercentage(java.lang.String txt1, java.lang.String txt2)
      Checks the similarity of two strings and returns their similarity percentage.
      • Methods inherited from class java.lang.Object

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

      • PHPSimilarText

        public PHPSimilarText()
    • Method Detail

      • similarityChars

        public static int similarityChars(java.lang.String txt1,
                                          java.lang.String txt2)
        Checks the similarity of two strings and returns the number of matching chars in both strings.
        Parameters:
        txt1 -
        txt2 -
        Returns:
      • similarityPercentage

        public static double similarityPercentage(java.lang.String txt1,
                                                  java.lang.String txt2)
        Checks the similarity of two strings and returns their similarity percentage.
        Parameters:
        txt1 -
        txt2 -
        Returns:

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.