Skip to content

Feat/1253 basic punctuation#1294

Open
sudhanshu112233shukla wants to merge 2 commits intoEpicenterHQ:mainfrom
sudhanshu112233shukla:feat/1253-basic-punctuation
Open

Feat/1253 basic punctuation#1294
sudhanshu112233shukla wants to merge 2 commits intoEpicenterHQ:mainfrom
sudhanshu112233shukla:feat/1253-basic-punctuation

Conversation

@sudhanshu112233shukla
Copy link
Copy Markdown

This PR introduces the “Simple Punctuation” transformation step requested in issue #1253, enabling automatic conversion of spoken punctuation commands—such as “period,” “comma,” and “new line”—into their corresponding symbols during post-processing. The update adds a new simple_punctuation entry to the transformation registry and updates the database schema to version 3. The transformation logic, implemented in transformation-logic.ts, uses carefully designed regular expressions with word-boundary checks to avoid false positives (for example, ensuring that words like “commander” are not mistakenly altered). Special handling is included for the “new line” command to remove awkward leading spaces on the following line, resulting in clean formatting. To ensure correctness and robustness, comprehensive unit tests were added in transformer.test.ts, covering case insensitivity, spacing variations, and edge cases. Verification was performed by running bun test src/lib/query/isomorphic/transformer.test.ts locally, with successful results confirming basic replacements (e.g., “Hello comma world” → “Hello, world”), case-insensitive behavior (“Period” → “.”), safety checks (“The commander” remains unchanged), and proper newline handling (“Line one new line Line two” → “Line one\nLine two”). This change fully resolves and closes issue #1253 without omitting any requested functionality.

…terHQ#1253)

- Adds 'simple_punctuation' transformation step type
- Implements regex-based replacement for period, comma, newline, etc.
- Updates database schema to Version 3
- Includes unit tests verifying logic
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.

1 participant