Skip to content

fix(pgn): normalize moves for more reliable opening detection - #7

Merged
mik0lajek merged 1 commit into
mainfrom
fix/opening-detection
May 4, 2026
Merged

fix(pgn): normalize moves for more reliable opening detection#7
mik0lajek merged 1 commit into
mainfrom
fix/opening-detection

Conversation

@mik0lajek

Copy link
Copy Markdown
Owner
  • strip semicolon comments and parenthesized variations from parsed move text
  • add normalizeMovesForOpeningDetection utility for matching purposes
  • use normalized moves in opening detection instead of raw tokens
  • preserve original parsed moves (with annotations) for display
  • add parser tests for variations, NAGs, move numbers, results, checks, mates, and annotations
  • add end-to-end enrichment test to verify annotated PGN still matches openings

- strip semicolon comments and parenthesized variations from parsed move text
- add normalizeMovesForOpeningDetection utility for matching purposes
- use normalized moves in opening detection instead of raw tokens
- preserve original parsed moves (with annotations) for display
- add parser tests for variations, NAGs, move numbers, results, checks, mates, and annotations
- add end-to-end enrichment test to verify annotated PGN still matches openings
@mik0lajek
mik0lajek merged commit ea54721 into main May 4, 2026
4 checks passed
@mik0lajek
mik0lajek deleted the fix/opening-detection branch May 4, 2026 09:43
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