fix: remove empty tokens for similarity calculation (#581)
parent
23a105e4cb
commit
981133d6c8
|
|
@ -169,7 +169,7 @@ lazy_static! {
|
||||||
fn tokenize_text(text: &str) -> Vec<&str> {
|
fn tokenize_text(text: &str) -> Vec<&str> {
|
||||||
TOKENIZER
|
TOKENIZER
|
||||||
.split(text)
|
.split(text)
|
||||||
.filter(|s| *s != "AND" && *s != "OR" && *s != "NOT")
|
.filter(|s| *s != "AND" && *s != "OR" && *s != "NOT" && !s.is_empty())
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue