Problem
The pl-pl intent files expand to 8,815 Padatious training samples — by far the largest locale in this skill (en-us is now 207 after pruning, see the prune PR). Padatious expands every (a|b|c) group into separate training samples and uses other intents' samples as negatives, so training cost grows superlinearly. Oversized locales contribute to slow skill loading and, combined with other Padatious skills, can crash the core service on older Padatious versions (see OscillateLabsLLC/skill-musicassistant#30 for the same problem and fix).
Measured with ovos_utils.bracket_expansion.expand_template:
| File |
Samples |
| lights.set.brightness.intent |
3,840 |
| sensor.intent |
2,092 |
| lights.get.brightness.intent |
1,680 |
| lights.set.color.intent |
480 |
| lights.get.color.intent |
240 |
| lights.increase.brightness.intent |
170 |
| lights.decrease.brightness.intent |
146 |
| (remaining 7 files) |
167 |
| Total |
8,815 |
The worst single line is all of lights.set.brightness.intent — one line with six stacked alternation groups (4 verbs × 2 × 4 nouns × 6 prepositions/possessives × 10 connectors × 2):
(dostrój|ustaw|zmień|przestaw) (|poziom) (jasność|jasności|oświetlenia|oświetlenie) (w|na|do|mojego|mojej|moich) {entity} (|do poziomu|do wartości|na poziom|na wartość|do|na|wartość|poproszę|poziom) {brightness} (|procent)
Why this needs a Polish speaker
Padatious generalizes from base forms, so the fix is to keep every real word but stop enumerating combinations — write a handful of flat, natural phrasings per intent instead of verb × noun × case-ending matrices. Choosing which phrasings are natural (and which case endings actually pair with which prepositions) requires Polish fluency. The maintainer doesn't speak Polish.
Specific things a Polish speaker should also look at while in there:
lights.get.brightness.intent line 1 has a bare stem obecn in (|aktualną|aktualny|obecn|obecny) — looks like a missing ending (obecna?), currently trains a non-word.
sensor.intent line 2 glues 17 adjective stems to a vowel-ending group (...|dostępn)(a|e|i|y|o|u). Clever, but it generates many non-word combinations (gorąci, włączonu, …) and 1,224 samples from one line. Flat enumeration of the ~20 real forms would be both correct and ~95% smaller.
- The 10-way connector group in
lights.set.brightness.intent (do poziomu, na wartość, poproszę, …) — most of these can likely be dropped entirely.
Target
Budgets enforced by test/test_intents.py for the other locales (pl-pl is currently exempted, referencing this issue):
- ≤ 600 samples per locale
- ≤ 200 samples per file
The fr-fr locale (83 samples, flat phrasings) is the model to copy; the pruned en-us files show the same approach with light alternation.
How to measure
from pathlib import Path
from ovos_utils.bracket_expansion import expand_template
for f in Path("skill_homeassistant/locale/pl-pl/intents").glob("*.intent"):
lines = [l.strip() for l in f.read_text().splitlines() if l.strip() and not l.strip().startswith("#")]
print(f.name, sum(len(expand_template(l)) for l in lines))
Once pruned, remove the pl-pl exemption in test/test_intents.py so the budget is enforced from then on.
Problem
The pl-pl intent files expand to 8,815 Padatious training samples — by far the largest locale in this skill (en-us is now 207 after pruning, see the prune PR). Padatious expands every
(a|b|c)group into separate training samples and uses other intents' samples as negatives, so training cost grows superlinearly. Oversized locales contribute to slow skill loading and, combined with other Padatious skills, can crash the core service on older Padatious versions (see OscillateLabsLLC/skill-musicassistant#30 for the same problem and fix).Measured with
ovos_utils.bracket_expansion.expand_template:The worst single line is all of
lights.set.brightness.intent— one line with six stacked alternation groups (4 verbs × 2 × 4 nouns × 6 prepositions/possessives × 10 connectors × 2):Why this needs a Polish speaker
Padatious generalizes from base forms, so the fix is to keep every real word but stop enumerating combinations — write a handful of flat, natural phrasings per intent instead of verb × noun × case-ending matrices. Choosing which phrasings are natural (and which case endings actually pair with which prepositions) requires Polish fluency. The maintainer doesn't speak Polish.
Specific things a Polish speaker should also look at while in there:
lights.get.brightness.intentline 1 has a bare stemobecnin(|aktualną|aktualny|obecn|obecny)— looks like a missing ending (obecna?), currently trains a non-word.sensor.intentline 2 glues 17 adjective stems to a vowel-ending group(...|dostępn)(a|e|i|y|o|u). Clever, but it generates many non-word combinations (gorąci,włączonu, …) and 1,224 samples from one line. Flat enumeration of the ~20 real forms would be both correct and ~95% smaller.lights.set.brightness.intent(do poziomu,na wartość,poproszę, …) — most of these can likely be dropped entirely.Target
Budgets enforced by
test/test_intents.pyfor the other locales (pl-pl is currently exempted, referencing this issue):The fr-fr locale (83 samples, flat phrasings) is the model to copy; the pruned en-us files show the same approach with light alternation.
How to measure
Once pruned, remove the pl-pl exemption in
test/test_intents.pyso the budget is enforced from then on.