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

Allow default.extend-words to work across punctuation #400

Open
aaronraimist opened this issue Jan 15, 2022 · 3 comments
Open

Allow default.extend-words to work across punctuation #400

aaronraimist opened this issue Jan 15, 2022 · 3 comments
Labels
question Uncertainty is involved

Comments

@aaronraimist
Copy link

Fuj'ehr, json-clos, add-ons and raim.ist are marked as misspelled by typos which is generally fine, other than add-ons which probably shouldn't be corrected. However the only way to mark them as false positives is to write partial words in the config file like:

[default.extend-words]
ehr = "ehr"
clos = "clos"
ons = "ons"
ist = "ist"

It would be nice to be able to write out the entire word like:

[default.extend-words]
"Fuj'ehr" = "Fuj'ehr"
"json-clos" = "json-clos"
"add-ons" = "add-ons"
"raim.ist = "raim.ist"

This would give more context to what the false positive is and to reduce likelihood of not catching a real misspelling in the future.

Possibly related to #399

@aaronraimist aaronraimist changed the title default.extend-words work across punctuation Allow default.extend-words to work across punctuation Jan 15, 2022
@epage
Copy link
Collaborator

epage commented Jan 16, 2022

The challenge is deciding what punctuation makes up a word or what doesn't. add-ons could just as well be subtracting one variable from the other. Ideally we'd catch that when the variables are declared and so wouldn't worry about it when just referencing them but it illustrates the idea.

@halkeye
Copy link
Contributor

halkeye commented Jan 28, 2022

Claus => Clause ✅
Santa Claus => Santa Clause ❌

Same with proper names "Alan O'Leary" shouldn't be updated to "Alan O'Leery"

lots of workarounds, but just adding more data to be consistered.

@tinmarino
Copy link

To silence this, I added:

default.extend-ignore-re = [
  "--hel", "add-ons"
]

PS: Thanks you @epage for this awesome program: I do not know how it works but it works and amazingly fast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Uncertainty is involved
Projects
None yet
Development

No branches or pull requests

4 participants