-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCosine.cs
51 lines (47 loc) · 1.75 KB
/
Cosine.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* Created by SharpDevelop.
* User: JT
* Date: 20.2.2010
* Time: 16:43
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using SimMetricsUtilities;
using SimMetricsMetricUtilities;
namespace PDFv2
{
/// <summary>
/// Description of Cosine.
/// </summary>
public class Cosine
{
/* private static readonly Levenstein _Levenstein;
private static readonly NeedlemanWunch _NeedlemanWunch;
private static readonly SmithWaterman _SmithWaterman;
private static readonly SmithWatermanGotoh _SmithWatermanGotoh;
private static readonly SmithWatermanGotohWindowedAffine _SmithWatermanGotohWindowedAffine;
private static readonly Jaro _Jaro;
private static readonly JaroWinkler _JaroWinkler;
private static readonly ChapmanLengthDeviation _ChapmanLengthDeviation;
private static readonly ChapmanMeanLength _ChapmanMeanLength;
private static readonly QGramsDistance _QGramsDistance;
private static readonly BlockDistance _BlockDistance;
*/ private static readonly CosineSimilarity _CosineSimilarity;
/* private static readonly DiceSimilarity _DiceSimilarity;
private static readonly EuclideanDistance _EuclideanDistance;
private static readonly JaccardSimilarity _JaccardSimilarity;
private static readonly MatchingCoefficient _MatchingCoefficient;
private static readonly MongeElkan _MongeElkan;
private static readonly OverlapCoefficient _OverlapCoefficient;
*/
static Cosine()
{
_CosineSimilarity = new CosineSimilarity();
}
public static double compare(string A, string B)
{
return _CosineSimilarity.GetSimilarity(A, B);
}
}
}