Example #1
0
 public static StringDistanceResult MeasureDistance(this AbstractStringMetric metric, string a, string b)
 {
     return(new StringDistanceResult
     {
         Similarity = metric.GetSimilarity(a, b),
         UnnormalizedSimilarity = metric.GetUnnormalisedSimilarity(a, b),
         MetricAlgorithm = metric,
         SimilarityDescription = metric.GetSimilarityExplained(a, b),
         ShortDescription = metric.ShortDescriptionString,
         LongDescription = metric.LongDescriptionString
     });
 }
Example #2
0
 /// <summary>
 /// constructor taking metric to use
 /// </summary>
 /// <param name="metricToUse">the string metric to use</param>
 public MongeElkan(AbstractStringMetric metricToUse)
 {
     tokeniser            = new TokeniserWhitespace();
     internalStringMetric = metricToUse;
 }
Example #3
0
 /// <summary>
 /// constructor taking a tokeniser and  string metric to use
 /// </summary>
 /// <param name="tokeniserToUse">the tokeniser to use should a different tokeniser be required</param>
 /// <param name="metricToUse">the string metric to use</param>
 public MongeElkan(ITokeniser tokeniserToUse, AbstractStringMetric metricToUse)
 {
     tokeniser            = tokeniserToUse;
     internalStringMetric = metricToUse;
 }
Example #4
0
 public MongeElkan(ITokeniser tokeniserToUse, AbstractStringMetric metricToUse)
 {
     this.estimatedTimingConstant = 0.034400001168251038;
     this.tokeniser            = tokeniserToUse;
     this.internalStringMetric = metricToUse;
 }
Example #5
0
 public MongeElkan(ITokeniser tokeniserToUse)
 {
     this.estimatedTimingConstant = 0.034400001168251038;
     this.tokeniser            = tokeniserToUse;
     this.internalStringMetric = new SmithWatermanGotoh();
 }
Example #6
0
 public MongeElkan(AbstractStringMetric metricToUse)
 {
     this.estimatedTimingConstant = 0.034400001168251038;
     this.tokeniser            = new TokeniserWhitespace();
     this.internalStringMetric = metricToUse;
 }