Skip to content

V1]individual] grammar cleaner#1282

Open
clintjeff2 wants to merge 2 commits into
Stellar-Mail:mainfrom
clintjeff2:V1]individual]-Grammar-Cleaner
Open

V1]individual] grammar cleaner#1282
clintjeff2 wants to merge 2 commits into
Stellar-Mail:mainfrom
clintjeff2:V1]individual]-Grammar-Cleaner

Conversation

@clintjeff2

Copy link
Copy Markdown

Motivation

  • Fix cases where homophone replacements (there, their, your) dropped the following verb or descriptor during replacement and add a few common misspelling corrections.
  • Make the engine more robust for phrase-level corrections while keeping the service deterministic and folder-local.

Description

  • Add new folder-local replacement rules for youryou're with captured continuation, theirsthere's, and accidentlyaccidentally inside tools/v1/individual/grammar-cleaner/services/grammarCleaner.ts.
  • Preserve captured follow-up words in existing there ... and their ... rules by changing the replacements to include the capture ("they're $1" and similar) so verbs/descriptors are not dropped.
  • Expand unit tests in tools/v1/individual/grammar-cleaner/tests/grammarCleaner.test.ts to assert phrase-preserving corrections and verify the new rules produce expected corrected text.

Testing

  • Ran git diff --check to ensure no whitespace/patch issues and validated the diff of modified files under tools/v1/individual/grammar-cleaner/.
  • Attempted to run unit tests with bunx vitest run --config tools/v1/individual/grammar-cleaner/vitest.config.ts but execution was blocked because the environment has no local node_modules and resolving vitest from the npm registry returned HTTP 403, so tests could not complete in this environment.

Closes #365

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.

[V1][individual] Grammar Cleaner - Core feature engine

1 participant