hunspell icon indicating copy to clipboard operation
hunspell copied to clipboard

Case-insensitive checking flag

Open fritttr opened this issue 7 years ago • 1 comments

I'd like to be able to set a flag to ignore case in spell-checking. For example, with the flag set, all three of the below expressions would evaluate to TRUE.

This would be helpful when using some NLP tools, like tokenizers, which often force text to lower case. Frequently, after tokenizing, I want to exclude words that are not in the dictionary. My current workaround is to force everything to uppercase.

hunspell_check("I'll") [1] TRUE hunspell_check("i'll") [1] FALSE hunspell_check("I'LL") [1] TRUE

fritttr avatar Mar 19 '17 20:03 fritttr

I'm not sure if there is a way to do this in libhunspell. Is this possible in the C++ api @laszlonemeth ?

@fritttr your best bet is probably to tolower() your input.

jeroen avatar Dec 14 '18 15:12 jeroen