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

Custom "do-not-match" list? #637

Open
ewa opened this issue Sep 13, 2023 · 2 comments
Open

Custom "do-not-match" list? #637

ewa opened this issue Sep 13, 2023 · 2 comments

Comments

@ewa
Copy link

ewa commented Sep 13, 2023

Motivation

(a1398) Trev.Barth.(Add 27944:Seymour) By weuyng and weryng [read: weþyng] togidere of trees ofte men kepeth and defendeþ hemselue from enemyes.
-- from Bartholomaeus's "De Proprietatibus Rerum", AD 1398.

I have a document in which I've typed "withing." Apparently, this is technically a word. It is the present participle of "to withe". If you are binding or beating someone with slender shoots and twigs of plants ("withes") then you are withing. I'm not sure it's really be used since the middle English period, but it's a word.

Aspell likes the word just fine:

...lib/aspell-0.60 andersoe  % echo "withing" | aspell -a
@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.8)
*

It's in the en-common dictionary:

...lib/aspell-0.60 andersoe % grep 'withing' *
Binary file en-common.rws matches

And that's all fine. It is a word.

But it's also clearly not the word I meant. I mis-typed "within."

Feature Request

Can we have a mechanism for excluding words, on a configurable, per-user, basis? We already have a "custom whitelist," that is, a "match this even if the dictionary says no" list. Can we have the opposite, a "blacklist" or "don't match this, even if the dictionary says yes" list?

Many thanks!

@ewa
Copy link
Author

ewa commented Sep 13, 2023

See also issue #440.

@kevina
Copy link
Member

kevina commented Oct 20, 2023

Hi, sorry for the delay.

Excluding words will introduce a lot of special cases I would rather avoid (expecially in the suggestion code). It is actually pretty easy to create a custom dictionary. Assuming you are using American English all you need to do is:

$ aspell dump master -d en_US > en_US.wl
# edit en_US to remove any problematic words
$ aspell create master -l en ~/.aspell.en-custom.rws < en_US.wl

Then to use it:

$ aspell -d ~/.aspell.en-custom.rws ...

You can name the file anything you want.

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

No branches or pull requests

2 participants