Class RatcliffObershelpMeasure

    • Constructor Detail

      • RatcliffObershelpMeasure

        public RatcliffObershelpMeasure()
    • Method Detail

      • getPrefixLength

        public int getPrefixLength​(int tokensNumber,
                                   double threshold)
        Description copied from interface: IStringMeasure
        Length of prefix to consider when mapping the input string with other strings.
        Specified by:
        getPrefixLength in interface IStringMeasure
        Parameters:
        tokensNumber - Size of input string in
        threshold - Similarity threshold
        Returns:
        Prefix length
      • getMidLength

        public int getMidLength​(int tokensNumber,
                                double threshold)
        Description copied from interface: IStringMeasure
        Theshold for the length of the tokens to be indexed
        Specified by:
        getMidLength in interface IStringMeasure
        Parameters:
        tokensNumber - Number of tokens of current input
        threshold - Similarity threshold
        Returns:
        Length of tokens to be indexed
      • getAlpha

        public int getAlpha​(int xTokensNumber,
                            int yTokensNumber,
                            double threshold)
        Description copied from interface: IStringMeasure
        Threshold for the positional filtering
        Specified by:
        getAlpha in interface IStringMeasure
        Parameters:
        xTokensNumber - Size of the first input string
        yTokensNumber - Size of the first input string
        threshold - Similarity threshold
        Returns:
        Threshold for positional filtering
      • getSimilarity

        public double getSimilarity​(int overlap,
                                    int lengthA,
                                    int lengthB)
        Description copied from interface: IStringMeasure
        Returns the similarity of two strings given their length and the overlap. Useful when these values are known so that no computation of known values have to be carried out anew
        Specified by:
        getSimilarity in interface IStringMeasure
        Parameters:
        overlap - Overlap of strings A and B
        lengthA - Length of A
        lengthB - Length of B
        Returns:
        Similarity of A and B
      • computableViaOverlap

        public boolean computableViaOverlap()
        Description copied from interface: IStringMeasure
        Returns true if this similarity function can be computed just via the getSimilarity(overlag, lengthA, lengthB)
        Specified by:
        computableViaOverlap in interface IStringMeasure
        Returns:
        True if it's possible, else false;
      • getSimilarity

        public double getSimilarity​(Object object1,
                                    Object object2)
        Description copied from interface: IMeasure
        Returns the similarity between two objects.
        Specified by:
        getSimilarity in interface IMeasure
        Parameters:
        object1 - , the source object
        object2 - , the target object
        Returns:
        The similarity of the objects
      • getType

        public String getType()
        Description copied from interface: IMeasure
        Returns type of a measure.
        Specified by:
        getType in interface IMeasure
        Returns:
        The runtime of the measure
      • getSimilarity

        public double getSimilarity​(Instance instance1,
                                    Instance instance2,
                                    String property1,
                                    String property2)
        Description copied from interface: IMeasure
        Returns the similarity between two instances, given their corresponding properties.
        Specified by:
        getSimilarity in interface IMeasure
        Parameters:
        instance1 - , the source instance
        instance2 - , the target instance
        property1 - , the source property
        property2 - , the target property
        Returns:
        The similarity of the instances
      • getName

        public String getName()
        Description copied from interface: IMeasure
        Returns name of a measure.
        Specified by:
        getName in interface IMeasure
        Returns:
        Measure name as a string
      • getRuntimeApproximation

        public double getRuntimeApproximation​(double mappingSize)
        Description copied from interface: IMeasure
        Returns the runtime approximation of a measure.
        Specified by:
        getRuntimeApproximation in interface IMeasure
        Parameters:
        mappingSize - , the mapping size returned by the measure
        Returns:
        The runtime of the measure