Closed fran6w closed 4 years ago
Hi, Thank you for your great library. I think I found an issue when multi-matchs occur. See example below:
from flashtext import KeywordProcessor kw = KeywordProcessor() kw.add_keyword('ABC', 'X') kw.add_keyword('ABC DEF', 'Y') kw.add_keyword('ABC GHI', 'Y')
kw.extract_keywords('ABC DEF') => ['Y'] that is OK
kw.extract_keywords('ABC DEF and ABC GHI') => ['X', 'Y'] that is not OK
Thank you
Francis
Hi, Thank you for your great library. I think I found an issue when multi-matchs occur. See example below:
from flashtext import KeywordProcessor kw = KeywordProcessor() kw.add_keyword('ABC', 'X') kw.add_keyword('ABC DEF', 'Y') kw.add_keyword('ABC GHI', 'Y')
kw.extract_keywords('ABC DEF') => ['Y'] that is OK
kw.extract_keywords('ABC DEF and ABC GHI') => ['X', 'Y'] that is not OK
Thank you
Francis