public class Util extends Object
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static float |
calculateDiceCoefficient(int intersection,
int size1,
int size2)
Calculate Dice's Coefficient
|
static float |
calculateNgramDiceCoefficient(String originalSource,
String newSource,
org.apache.lucene.analysis.Analyzer triGramAnalyzer)
Calculate Dice's Coefficient for two strings with tokens as ngrams.
|
public static float calculateDiceCoefficient(int intersection,
int size1,
int size2)
intersection - number of tokens in common between input 1 and input 2size1 - token size of first inputsize2 - token size of second inputpublic static float calculateNgramDiceCoefficient(String originalSource, String newSource, org.apache.lucene.analysis.Analyzer triGramAnalyzer)
originalSource - first string to comparenewSource - second string to comparetriGramAnalyzer - trigram analyzer for FM-score calculationCopyright © 2022. All rights reserved.