GNUAspell / aspell

http://aspell.net
GNU Lesser General Public License v2.1
243 stars 53 forks source link

Aspell and the word "rj45" #649

Closed klapvogn closed 4 months ago

klapvogn commented 4 months ago

Hi,

I have an error when I try to do : echo -e "*rj45\n#" | aspell -a

I get:

@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.8)
Error: The word "rj45" is invalid. The character '4' (U+34) may not appear in the middle of a word.

Is there something I can do to make it work?

kevina commented 4 months ago

Hi, unfortunately Aspell does not support numbers as part of a word.

By creating a custom charset, you can force Aspell to accept all digits as part of a word but then all numbers will be flagged as misspelling. It is not something I would recommend.

klapvogn commented 4 months ago

That's sad :-( thats how it's build :) thanks for the reply

kevina commented 4 months ago

Note that if you are using Aspell 0.60.8 or newer you can also set the config option validate-words to false to allow the word into the personal dictionary. For example aspell --dont-validate-words -a. However once this word is in your personal dictionary you will need to always have this option set. Also, note that you will only be able to check the word "rj45" if the application is using the C API. If it is using the pipe interface the "45" part will not be recognized as part of the word and Aspell will instead check for "rj".

klapvogn commented 4 months ago

Thanks. It's kinda no big deal. I only use aspell together with Weechat. As i'm Danish not every english words I know how to spell. So it's handy in Weechat

You can see here how it works: https://github.com/GNUAspell/aspell/assets/2506366/4fd65f9f-2668-41b9-826f-258135b79f50