Ejemplo n.º 1
0
        private void NotSimilar(LevensteinAlgorithm <Word, char> algorithm, string left, string right)
        {
            var similarity = algorithm.GetSimilarity(left, right);

            Assert.Less(similarity, 0.5, string.Format("{0}-{1} should NOT be similar (Similarity: {2})", left, right, similarity));
        }
Ejemplo n.º 2
0
        private void NotSimilar(LevensteinAlgorithm <Phrase, Word> algorithm, string left, string right)
        {
            var similarity = algorithm.GetSimilarity(left, right);

            Assert.IsTrue(similarity < 0.5, string.Format("{0}-{1} should NOT be similar (Similarity: {2})", left, right, similarity));
        }
Ejemplo n.º 3
0
        private void AreSimilar(LevensteinAlgorithm <Word, char> algorithm, string left, string right)
        {
            var similarity = algorithm.GetSimilarity(left, right);

            Assert.Greater(similarity, 0.6, string.Format("{0}-{1} should be similar (Similarity: {2})", left, right, similarity));
        }