Skip to content

Commit c188009

Browse files
committed
Update readme
1 parent 17d84ec commit c188009

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,12 @@ public static void main(String[] args) {
5353
// direct match
5454
boolean result1 = p.contains("测试文本", "ceshi");
5555
// indexed match
56-
PinyinTree<Integer> tree = new PinyinTree<>(true, p);
56+
Searcher<Integer> searcher = new TreeSearcher<>(CONTAIN, p));
5757
p.put("测试文本", 0);
58-
boolean result2 = tree.search("ceshi").contains(0);
58+
boolean result2 = searcher.search("ceshi").contains(0);
59+
// fuzzy spelling
60+
p.config().fSh2S(true).commit();
61+
boolean result3 = p.contains("测试文本", "cesi");
5962
// pinyin format
6063
Char c = p.genChar('');
6164
Pinyin y = c.pinyins()[0];

0 commit comments

Comments
 (0)