List of usage examples for org.apache.lucene.search.spell LevenshteinDistance LevenshteinDistance
public LevenshteinDistance()
From source file:com.ostrichemulators.semtool.rdf.engine.util.EngineConsistencyCheckerTest.java
@Before public void setUp() { ecc = new EngineConsistencyChecker(engine, false, new LevenshteinDistance()); }
From source file:com.ostrichemulators.semtool.ui.components.CheckConsistencyPanel.java
public CheckConsistencyPanel() { initComponents();/*w ww . jav a 2 s.co m*/ conceptList.setCellRenderer(crenderer); relationList.setCellRenderer(rrenderer); LabeledPairRenderer<StringDistance> arend = new LabeledPairRenderer<>(); algorithm.setRenderer(arend); Map<StringDistance, String> dists = new LinkedHashMap<>(); dists.put(new LevenshteinDistance(), "Levenstein"); dists.put(new DoubleMetaphoneDistance(), "Double Metaphone"); dists.put(new MetaphoneDistance(), "Metaphone"); dists.put(new SoundexDistance(), "Soundex"); arend.cache(dists); for (StringDistance s : dists.keySet()) { algorithm.addItem(s); } }