You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the last two characters of the first string in the list are consecutive coding, then only the last character can be queried to return the correct result, which is different from the expected.
Code example:
//list add 123 or 234 or 345
//key = 3 or 4 or 5
//The results are all matchable
DoubleArrayTrie adt = new DoubleArrayTrie();
List list = new ArrayList();
list.add("123");
// 所有词必须先排序
Collections.sort(list);
// 构建DoubleArrayTrie
adt.build(list);
String key = "3";
// 检索key是否完全命中了词典中的某个词
int index = adt.exactMatchSearch(key);
System.out.println(index)
//print result 0
The text was updated successfully, but these errors were encountered:
If the last two characters of the first string in the list are consecutive coding, then only the last character can be queried to return the correct result, which is different from the expected.
Code example:
//list add 123 or 234 or 345
//key = 3 or 4 or 5
//The results are all matchable
DoubleArrayTrie adt = new DoubleArrayTrie();
List list = new ArrayList();
list.add("123");
// 所有词必须先排序
Collections.sort(list);
// 构建DoubleArrayTrie
adt.build(list);
String key = "3";
// 检索key是否完全命中了词典中的某个词
int index = adt.exactMatchSearch(key);
System.out.println(index)
//print result 0
The text was updated successfully, but these errors were encountered: