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

bug: Contractions are incorrectly reported as typos #22

Closed
nfelt14 opened this issue Apr 23, 2024 · 2 comments
Closed

bug: Contractions are incorrectly reported as typos #22

nfelt14 opened this issue Apr 23, 2024 · 2 comments
Assignees

Comments

@nfelt14
Copy link
Contributor

nfelt14 commented Apr 23, 2024

Description of the bug

Basic contractions such as "Doesn't" or "couldn't" are being reported as typos because the checker is splitting the word on the single quote character.

To Reproduce

  1. Create a document with the word "doesn't" in it
  2. Build the docs with the symspellpy backend

Full traceback

WARNING -  mkdocs_spellcheck: (symspellpy) index.md: Misspelled 'doesn', did you mean 'does'?

Expected behavior

The contraction should not be flagged as a typo.

Environment information

$ python -m mkdocs_spellcheck.debug
- __System__: Windows-10-10.0.19045-SP0
- __Python__: cpython 3.11.8
- __Environment variables__:
- __Installed packages__:
  - `mkdocs-spellcheck` v1.0.3
@pawamoy
Copy link
Owner

pawamoy commented Apr 23, 2024

Yep, I'm aware of this limitation. There's no easy solution though. Each language has its own peculiarities. We could rely on natural language processing libraries to correctly split text. Not sure how easy it would be :) Happy to see more suggestions and/or review PRs that address this!

@pawamoy
Copy link
Owner

pawamoy commented Oct 25, 2024

Closing in favor of #3.

@pawamoy pawamoy closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2024
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