danielroe / danielroe/pangrum

Prevent daily games from having an excessive amount of words

Open
#23 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
50
Forks
8
Avg merge
19h 40m
Merged PRs (30d)
11

Description

Because of how Spanish handles verbs, `?date=2026-01-24&lang=es` resulted in a game of 1181 words. I don't think the game was designed with something like this in mind haha

To ensure finishing a game is something achievable in all languages (at the end of the day this is why we have daily puzzles, not monthly lol), I would like to propose adding a feature that allows us to ignore a set of given flags for each locale.

You can find a list of all the flags and rules the game _unmunches_ here: https://github.com/sbosio/rla-es/blob/master/ortografia/afijos/afijos.txt

Note that that is +7000 loc for verbs-only and 500 for everything else. Yay Spanish! 🎉

I have [part of the proposed solution here](https://github.com/danielroe/pangrum/compare/main...hacknug:pangrum:feat/no-verbs) keeping only the infinitive form of all verbs. It can't be merged as is, as the change would, **at least**, mess with historic data and cached dictionaries. Perhaps we could/should introduce versioning of these dictionaries?

With the proposed changes, `?date=2026-01-24&lang=es` would go down from 1181 to 249 words (tested by hardcoding `const letters = ["P","E","A","G","N","D","R"]`). Other relevant numbers:

| | current | proposal |
|--------------------------------- |------------- |------------- |
| expanded words | 655708 | 117514 |
| proper nouns | 911 | 911 |
| extracted words | 652693 | 114618 |
| pangrams | 26066 | 9802 |
| `?date=2026-01-24&lang=es` | 1181 | 249 |

Please note the flags were extracted by an LLM so there might be some errors there.

I'm open to making changes to the proposed values for the `ignoredFlags` array, although I'd like to focus this issue more on the groundwork needed to do that.

Would love to hear your thoughts on this 👍

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.