barrust / pyspellchecker

Pure Python Spell Checking http://pyspellchecker.readthedocs.io/en/latest/
MIT License
714 stars 164 forks source link

Addition of remove_by_threshold #18

Closed ksingha5 closed 6 years ago

ksingha5 commented 6 years ago

Provides a way for the user to remove words from the word frequency list under a user provided frequency threshold.

spell = SpellChecker()

"teh" in spell._word_frequency
#True

spell.word_frequency.remove_by_threshold(7)

"teh" in spell._word_frequency
#False

Let me know your thoughts! Would help resolve #16

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-3.0%) to 95.42% when pulling 1fe0988c72b7b8b7b5ff05dfadd72f5d08be70b5 on ksingha5:master into 2bdb3059a9978df1562692b6a9859e67e5c715ed on barrust:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-3.0%) to 95.42% when pulling 1fe0988c72b7b8b7b5ff05dfadd72f5d08be70b5 on ksingha5:master into 2bdb3059a9978df1562692b6a9859e67e5c715ed on barrust:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-3.0%) to 95.42% when pulling 1fe0988c72b7b8b7b5ff05dfadd72f5d08be70b5 on ksingha5:master into 2bdb3059a9978df1562692b6a9859e67e5c715ed on barrust:master.

barrust commented 6 years ago

@ksingha5 Thank you for the PR! Unfortunately I have already merged a very similar approach to get this accomplished! It will be available in the next release, which hopefully will be by the end of the week. (Give myself a deadline!)

Thank you for your insights and suggestions! P

ksingha5 commented 6 years ago

Thank you @barrust !