- Renamed TRStringDistance to LevensteinDistance (related to LUCENE-1297)

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@669086 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Otis Gospodnetic 2008-06-18 05:09:11 +00:00
parent ce19aa28c0
commit 8b11f3b077
3 changed files with 5 additions and 5 deletions

View File

@ -20,13 +20,13 @@ package org.apache.lucene.search.spell;
/**
* Levenshtein edit distance class.
*/
final class TRStringDistance implements StringDistance {
final class LevensteinDistance implements StringDistance {
/**
* Optimized to run a bit faster than the static getDistance().
* In one benchmark times were 5.3sec using ctr vs 8.5sec w/ static method, thus 37% faster.
*/
public TRStringDistance () {
public LevensteinDistance () {
}

View File

@ -92,7 +92,7 @@ public class SpellChecker {
}
public SpellChecker(Directory spellIndex) throws IOException {
this(spellIndex,new TRStringDistance());
this(spellIndex, new LevensteinDistance());
}
/**

View File

@ -21,7 +21,7 @@ import junit.framework.TestCase;
public class TestLevenshteinDistance extends TestCase {
private StringDistance sd = new TRStringDistance();
private StringDistance sd = new LevensteinDistance();
public void testGetDistance() {
float d = sd.getDistance("al", "al");
@ -46,4 +46,4 @@ public class TestLevenshteinDistance extends TestCase {
assertTrue(d1 > d2);
}
}
}