Closed vi3k6i5 closed 7 years ago
Bug fixed:
from flashtext.keyword import KeywordProcessor
keyword_processor = KeywordProcessor()
keyword_processor.add_keyword('spring', 'spring framework')
keyword_processor.add_keyword('framework', 'framework')
keyword_processor.add_keyword('spring framework', 'spring framework')
print(keyword_processor.extract_keywords('spring framework'))
# ['spring framework']
It extracts multiple terms even though it should extract only 1 longest match:
But this case it works: