@Test public void stemEndingTest2() { TurkishMorphology morphology = TurkishMorphology.builder() .setLexicon("üzmek", "yüz", "güz").build(); List<String> endings = Lists.newArrayList("düm"); StemEndingGraph graph = new StemEndingGraph(morphology, endings); CharacterGraphDecoder spellChecker = new CharacterGraphDecoder(graph.stemGraph); List<ScoredItem<String>> res = spellChecker.getSuggestionsWithScores("yüzdüm"); Assert.assertEquals(3, res.size()); assertContainsAll(res, "yüzdüm", "üzdüm", "güzdüm"); }
public List<ScoredItem<String>> getSuggestionsWithScores(String input) { Decoder decoder = new Decoder(); return getMatches(input, decoder); }
CharacterGraphDecoder { public List<ScoredItem<String>> getSuggestionsWithScores(String input) { Decoder decoder = new Decoder(); return getMatches(input, decoder); } }
CharacterGraphDecoder { public List<ScoredItem<String>> getSuggestionsWithScores(String input) { Decoder decoder = new Decoder(); return getMatches(input, decoder); } CharacterGraphDecoder(float maxPenalty);  CharacterGraphDecoder();  CharacterGraphDecoder(CharacterGraph graph);  CharacterGraphDecoder(float maxPenalty, Map<Character, String> nearKeyMap); }
CharacterGraphDecoder { public List<ScoredItem<String>> getSuggestionsWithScores(String input) { Decoder decoder = new Decoder(); return getMatches(input, decoder); } CharacterGraphDecoder(float maxPenalty);  CharacterGraphDecoder();  CharacterGraphDecoder(CharacterGraph graph);  CharacterGraphDecoder(float maxPenalty, Map<Character, String> nearKeyMap); CharacterGraph getGraph(); void addWord(String word); void addWords(String... words); void addWords(List<String> vocabulary); List<ScoredItem<String>> getSuggestionsWithScores(String input); List<ScoredItem<String>> getSuggestionsWithScores(String input, CharMatcher matcher); FloatValueMap<String> decode(String input); List<String> getSuggestions(String input); List<String> getSuggestions(String input, CharMatcher matcher); List<String> getSuggestionsSorted(String input); }
CharacterGraphDecoder { public List<ScoredItem<String>> getSuggestionsWithScores(String input) { Decoder decoder = new Decoder(); return getMatches(input, decoder); } CharacterGraphDecoder(float maxPenalty);  CharacterGraphDecoder();  CharacterGraphDecoder(CharacterGraph graph);  CharacterGraphDecoder(float maxPenalty, Map<Character, String> nearKeyMap); CharacterGraph getGraph(); void addWord(String word); void addWords(String... words); void addWords(List<String> vocabulary); List<ScoredItem<String>> getSuggestionsWithScores(String input); List<ScoredItem<String>> getSuggestionsWithScores(String input, CharMatcher matcher); FloatValueMap<String> decode(String input); List<String> getSuggestions(String input); List<String> getSuggestions(String input, CharMatcher matcher); List<String> getSuggestionsSorted(String input); static final Map<Character, String> TURKISH_FQ_NEAR_KEY_MAP; static final Map<Character, String> TURKISH_Q_NEAR_KEY_MAP; static final DiacriticsIgnoringMatcher DIACRITICS_IGNORING_MATCHER; final float maxPenalty; final boolean checkNearKeySubstitution; public Map<Character, String> nearKeyMap; }