01: package org.incava.text;
02:
03: import java.io.*;
04: import java.util.*;
05: import org.incava.io.FileExt;
06:
07: /**
08: * Calculates the edit distance between two strings.
09: */
10: public class NoCaseSpellChecker extends SpellChecker {
11: public int compare(String str1, int len1, String str2, int len2) {
12: return super .compare(str1.toLowerCase(), len1, str2
13: .toLowerCase(), len2);
14: }
15:
16: public boolean hasWord(String word) {
17: return super .hasWord(word.toLowerCase());
18: }
19:
20: public void addWord(String word) {
21: super.addWord(word.toLowerCase());
22: }
23: }
|