ropensci / hunspell

High-Performance Stemmer, Tokenizer, and Spell Checker for R
https://docs.ropensci.org/hunspell
Other
109 stars 44 forks source link

Resetting ignored words #30

Closed oloverm closed 6 years ago

oloverm commented 7 years ago

If I ignore a word with the ignore argument, it remains ignored in future checks:

> hunspell("ggggggg")
[[1]]
[1] "ggggggg"

> hunspell("ggggggg", ignore = "ggggggg")
[[1]]
character(0)

> hunspell("ggggggg")
[[1]]
character(0)

But if I ignore it with dict = dictionary(add_words = ), it doesn't stay ignored:

> hunspell("fffffff")
[[1]]
[1] "fffffff"

> hunspell("fffffff", dict = dictionary(add_words = "fffffff"))
[[1]]
character(0)

> hunspell("fffffff")
[[1]]
[1] "fffffff"

I don't know which of the two behaviours is preferable, but they should probably be consistent, and it would be good to be able to reset the words added with ignore.

jeroen commented 7 years ago

Ah that's a caching bug. Thanks for reporting.

jeroen commented 6 years ago

Fixed again in 2.9.