vi3k6i5 / flashtext

Extract Keywords from sentence or Replace keywords in sentences.
MIT License
5.58k stars 598 forks source link

Extract Keywords Bug #87

Open DotaArtist opened 5 years ago

DotaArtist commented 5 years ago

The target word suffix plus a number will cause the extraction to fail.

import flashtext _extractor = flashtext.KeywordProcessor() _extractor.add_keyword('地中海贫血') True _extractor.extract_keywords('地中海贫血') ['地中海贫血'] _extractor.extract_keywords('地中海贫血2') []

rmz59 commented 5 years ago

FlashText is designed to only match complete words (words with boundary characters on both sides)

https://arxiv.org/pdf/1711.00046.pdf