Package com.intuit.fuzzymatcher.function
Interface ScoringFunction
-
-
Field Summary
Fields Modifier and Type Field Description static doubleDEFAULT_UNMATCHED_CHILD_SCOREstatic doubleEXPONENTstatic doubleEXPONENTIAL_INCREASE_THRESHOLD
-
Method Summary
Static Methods Modifier and Type Method Description static ScoringFunctiongetAverageScore()For all the childScores in a Match object it calculates the average.static doublegetChildCount(Match match)static ScoringFunctiongetExponentialAverageScore()Follows the same rules as "getAverageScore", and in addition if more than 1 children match above a score of 0.9, it exponentially increases the overall score by using a 1.5 exponentstatic doublegetExponentiallyIncreasedValue(double value)static ScoringFunctiongetExponentialWeightedAverageScore()This is the default scoring used to calculate the Document score by aggregating the child Element scores.static List<Score>getNonPerfectMatchedElement(List<Score> childScoreList)static List<Score>getPerfectMatchedElement(List<Score> childScoreList)static ScoringFunctiongetSimpleAverageScore()For all the childScores in a Match object it calculates the average.static doublegetSumOfResult(List<Score> childScoreList)static doublegetSumOfWeightedResult(List<Score> childScoreList)static doublegetSumOfWeights(List<Score> childScoreList)static doublegetUnmatchedChildScore(Match match)static ScoringFunctiongetWeightedAverageScore()Follows the same rules as "getAverageScore" and in addition applies weights to children.
-
-
-
Field Detail
-
EXPONENT
static final double EXPONENT
- See Also:
- Constant Field Values
-
EXPONENTIAL_INCREASE_THRESHOLD
static final double EXPONENTIAL_INCREASE_THRESHOLD
- See Also:
- Constant Field Values
-
DEFAULT_UNMATCHED_CHILD_SCORE
static final double DEFAULT_UNMATCHED_CHILD_SCORE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAverageScore
static ScoringFunction getAverageScore()
For all the childScores in a Match object it calculates the average. To get a balanced average for 2 Match object which do not have same number of childScores. It gives a score of 0.5 for missing children- Returns:
- the scoring function for Average
-
getSimpleAverageScore
static ScoringFunction getSimpleAverageScore()
For all the childScores in a Match object it calculates the average. Average is calculated with a total of child scored divided by the child count- Returns:
- the scoring function for Simple Average
-
getWeightedAverageScore
static ScoringFunction getWeightedAverageScore()
Follows the same rules as "getAverageScore" and in addition applies weights to children. It can be used for aggregating Elements to Documents, where weights can be provided at Element level- Returns:
- the scoring function for WeightedAverage
-
getExponentialAverageScore
static ScoringFunction getExponentialAverageScore()
Follows the same rules as "getAverageScore", and in addition if more than 1 children match above a score of 0.9, it exponentially increases the overall score by using a 1.5 exponent- Returns:
- the scoring function for ExponentialAverage
-
getExponentialWeightedAverageScore
static ScoringFunction getExponentialWeightedAverageScore()
This is the default scoring used to calculate the Document score by aggregating the child Element scores. This combines the benefits of weights and exponential increase when calculating the average scores.- Returns:
- the scoring function for ExponentialWeightedAverage
-
getExponentiallyIncreasedValue
static double getExponentiallyIncreasedValue(double value)
-
getNonPerfectMatchedElement
static List<Score> getNonPerfectMatchedElement(List<Score> childScoreList)
-
getChildCount
static double getChildCount(Match match)
-
getUnmatchedChildScore
static double getUnmatchedChildScore(Match match)
-
-