Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rm non_word_boundaries #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Yvette-Wang
Copy link

No description provided.

@iwpnd
Copy link

iwpnd commented Nov 25, 2019

I don't think this helps flashtexts intended use. Removing word boundaries entirely will only result in "words found in words" kind of results. As seen here:

from flashtext import KeywordProcessor
kp = KeywordProcessor()
kp.add_keywords_from_list(['cat', 'catch'])
kp.non_word_boundaries = "_"

text = 'Try to catch this.'
kp.extract_keywords(text)
>> ['cat']

Since flashtext stops at the first hit, it won't even find "catch".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants