You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b25154f
Browse filesBrowse the repository at this point in the historyBrowse files
-`HeuristicSyllableCounter::hasWord()` — per-word lookup in problemWords
10
+
- 39 new tests: `HeuristicSyllableCounterTest` (25), `CompositeSyllableCounterTest` (9), `LanguageTest` (+5)
11
+
12
+
### Changed
13
+
-**Heuristic now complements TeX, not replaces it**: `composite` mode uses heuristic only for explicit problemWords, falling through to TeX for everything else
14
+
-`hasRules()` now checks only `problemWords` (not subtract/addPatterns) — allows TeX fallthrough for non-problem words
15
+
-`CompositeSyllableCounter` fallback: `return 1` → delegates to last counter in chain
16
+
17
+
### Fixed
18
+
-**Non-ASCII support**: `[^a-z]` → `[^\p{L}]/u`, all `preg_*` calls now use `/u` flag — Cyrillic, German umlauts, accented characters correctly preserved
19
+
-`WienerSachtextformel`: invalid variant numbers (0, 5+) now throw `\InvalidArgumentException` instead of silently computing variant 4
20
+
-`SzigrisztPazos`: redundant `*100/100` eliminated, display value preserved in inputs
21
+
22
+
### Removed
23
+
-`FormulaResult::gradeLabel` — dead field, always `null` across 16 of 17 formulas (Lix duplicated `interpretation`)
24
+
-`Engine::$languageRepository` — unused property (kept as local variable in constructor)
25
+
-`Pattern::toString()` — dead production code
26
+
-`wordsWithNSyllables()` → renamed to `wordsWithMoreThanNSyllables()` (name now matches behaviour: `> N`)
| C1 | CRITICAL |`HeuristicSyllableCounter`, `CompositeSyllableCounter`, `Engine`| Heuristic полностью подавляет TeX для английского — `hasRules()` возвращал true из-за subtract/addPatterns, Composite никогда не доходил до TeX | ✓ fixed |
14
+
| M1 | MEDIUM |`HeuristicSyllableCounter.php:71`|`preg_replace('/[^a-z]/', ...)` вырезал все не-ASCII символы; `preg_split`/`preg_match` без флага `/u` ломали UTF-8 | ✓ fixed |
15
+
| M2 | MEDIUM |`TextAnalyzer.php:96`, `Engine.php:179`|`wordsWithNSyllables()` считает слова с **>N** слогов, называется «с N слогами» | ✓ fixed |
16
+
| L1 | LOW |`FormulaResult.php:16`|`gradeLabel` всегда `null` (кроме Lix, где дублирует `interpretation`) | ✓ fixed |
17
+
| L2 | LOW |`Engine.php:35`|`$languageRepository` присвоен в конструкторе, нигде больше не прочитан | ✓ fixed |
18
+
| L3 | LOW |`Pattern.php:22`|`toString()` никогда не вызывается в production | ✓ fixed |
19
+
| L4 | LOW |`WienerSachtextformel.php:45-55`| variant=5 молча считается как variant=4 | ✓ fixed |
0 commit comments