Skip to content

fix: preserve proper nouns and acronyms during Spanish spell correction - #11

Merged
estherg12 merged 3 commits into
estherg12:mainfrom
SankalpBahad:bug/spellchecker-overwriting-nouns-acronyms
Sep 30, 2026
Merged

estherg12 merged 3 commits into
estherg12:mainfrom
SankalpBahad:bug/spellchecker-overwriting-nouns-acronyms

Conversation

@SankalpBahad

Copy link
Copy Markdown
Contributor

Description

Fixes #8

This change prevents the Spanish spell checker from incorrectly modifying proper nouns, acronyms, alphanumeric tokens, and other non-standard words.

Changes

  • Preserve all-uppercase acronyms
  • Preserve capitalized/proper nouns
  • Preserve mixed-case words
  • Preserve hyphenated names
  • Preserve alphanumeric tokens
  • Apply spell correction only to ordinary lowercase words
  • Add regression tests for the above cases

Testing

  • Ran the existing pytest suite
  • Added tests covering acronyms, proper nouns, mixed-case names,
    hyphenated names, alphanumeric tokens, and numbers

@SankalpBahad

Copy link
Copy Markdown
Contributor Author

@estherg12 please do have a look at the PR

@estherg12
estherg12 merged commit 2dc7e96 into estherg12:main Sep 30, 2026
1 check passed
@estherg12

Copy link
Copy Markdown
Owner

Thank you very much for your colaboration! Hope to see you again.

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

Successfully merging this pull request may close these issues.

[BUG] NLP spellchecker overwrites proper nouns and acronyms

2 participants