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
Putting "addKeywords" in different code spots produces different results. Here is JUnit Test that produces different results with 0.6.3. The Second test fails:
class TrieTest {
@Test
fun `works`() {
val trie = Trie.builder()
.ignoreCase()
.stopOnHit()
.onlyWholeWords()
.addKeywords(listOf("WhatsApp", "Ban me please"))
.build()
assertFalse(trie.parseText("Ban me please. I appreciated it").isEmpty(), "failed 1")
assertEquals(1, trie.parseText("Call me on WhatsApp. Here is my number").size, "failed 2")
}
@Test
fun `bug-report`() {
val trie = Trie.builder()
.addKeywords(listOf("WhatsApp", "Ban me please"))
.ignoreCase()
.stopOnHit()
.onlyWholeWords()
.build()
assertFalse(trie.parseText("Ban me please. I appreciated it").isEmpty(), "failed 1")
assertEquals(1, trie.parseText("Call me on WhatsApp. Here is my number").size, "failed 2")
}
}
The text was updated successfully, but these errors were encountered:
Putting "addKeywords" in different code spots produces different results. Here is JUnit Test that produces different results with 0.6.3. The Second test fails:
The text was updated successfully, but these errors were encountered: