Skip to content

Commit 1776151

Browse files
committed
Em
1 parent b25154f commit 1776151

4 files changed

Lines changed: 19 additions & 76 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
check:
11-
name: PHP ${{ matrix.php }} Tests
11+
name: PHP ${{ matrix.php }} - Tests
1212
runs-on: ubuntu-latest
1313
strategy:
1414
fail-fast: false

CHANGELOG.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,34 @@ All notable changes to ReadSight will be documented in this file.
55
## [1.0.5] - 2026-06-26
66

77
### Added
8-
- `Language::syllableMode` per-language syllable counting strategy (`tex`|`heuristic`|`composite`), default `tex`
9-
- `HeuristicSyllableCounter::hasWord()` per-word lookup in problemWords
8+
- `Language::syllableMode` - per-language syllable counting strategy (`tex`|`heuristic`|`composite`), default `tex`
9+
- `HeuristicSyllableCounter::hasWord()` - per-word lookup in problemWords
1010
- 39 new tests: `HeuristicSyllableCounterTest` (25), `CompositeSyllableCounterTest` (9), `LanguageTest` (+5)
1111

1212
### Changed
1313
- **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
14+
- `hasRules()` now checks only `problemWords` (not subtract/addPatterns) - allows TeX fallthrough for non-problem words
1515
- `CompositeSyllableCounter` fallback: `return 1` → delegates to last counter in chain
1616

1717
### Fixed
18-
- **Non-ASCII support**: `[^a-z]``[^\p{L}]/u`, all `preg_*` calls now use `/u` flag Cyrillic, German umlauts, accented characters correctly preserved
18+
- **Non-ASCII support**: `[^a-z]``[^\p{L}]/u`, all `preg_*` calls now use `/u` flag - Cyrillic, German umlauts, accented characters correctly preserved
1919
- `WienerSachtextformel`: invalid variant numbers (0, 5+) now throw `\InvalidArgumentException` instead of silently computing variant 4
2020
- `SzigrisztPazos`: redundant `*100/100` eliminated, display value preserved in inputs
2121

2222
### 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
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
2626
- `wordsWithNSyllables()` → renamed to `wordsWithMoreThanNSyllables()` (name now matches behaviour: `> N`)
2727

2828
### Data
29-
- `en-us.json`, `en-gb.json` added `"syllableMode": "composite"`
29+
- `en-us.json`, `en-gb.json` - added `"syllableMode": "composite"`
3030

3131
## [1.0.4] - 2026-06-26
3232

3333
### Added
34-
- **7 new languages**: Arabic (ar), Bengali (bn), Farsi (fa), Hebrew (he), Hindi (hi), Mongolian LMC (mn-cyrl-x-lmc), Vietnamese (vi) 79 → **86 languages**
35-
- **2 new writing systems**: Arabic, Hebrew 16 → **19**
34+
- **7 new languages**: Arabic (ar), Bengali (bn), Farsi (fa), Hebrew (he), Hindi (hi), Mongolian LMC (mn-cyrl-x-lmc), Vietnamese (vi) - 79 → **86 languages**
35+
- **2 new writing systems**: Arabic, Hebrew - 16 → **19**
3636
- `Script` enum: added `Hebrew` case
3737

3838
### Fixed
@@ -47,24 +47,24 @@ All notable changes to ReadSight will be documented in this file.
4747
## [1.0.3] - 2026-06-26
4848

4949
### Added
50-
- **Native `.tex` pattern support** via `TexSource` parses hyph-utf8 `.tex` files directly, preserving word-boundary markers (dots) for superior accuracy
51-
- `PatternsCollection::getByFirstChar()` public API for index-based pattern lookup
52-
- `LanguageCode::normalize()` static factory, now used in `JsonLanguageRepository` to eliminate duplicated normalization
50+
- **Native `.tex` pattern support** via `TexSource` - parses hyph-utf8 `.tex` files directly, preserving word-boundary markers (dots) for superior accuracy
51+
- `PatternsCollection::getByFirstChar()` - public API for index-based pattern lookup
52+
- `LanguageCode::normalize()` - static factory, now used in `JsonLanguageRepository` to eliminate duplicated normalization
5353
- 28 new tests: `TextStatisticsHelper` (5), `PatternsCollection` (3), `LanguageCode` (1), formula metadata (17), Engine edge cases (+2)
5454

5555
### Changed
5656
- **Pattern source**: `Engine` now uses `.tex` files by default (from hyph-utf8), with no fallback to less accurate `.pat.txt`
57-
- `HyphenationException` renamed to `HyphenationOverride` clearer semantics (DTO, not PHP exception)
57+
- `HyphenationException` renamed to `HyphenationOverride` - clearer semantics (DTO, not PHP exception)
5858
- `PatternsCollectionTest` extracted to its own file (was invisible to PHPUnit)
5959
- `LanguageCode` integrated into production code (was dead code)
6060

6161
### Removed
62-
- `PatTxtSource` and `PatTxtSourceTest` replaced by `TexSource`
63-
- All `.pat.txt` and `.hyp.txt` files replaced by `.tex` originals
62+
- `PatTxtSource` and `PatTxtSourceTest` - replaced by `TexSource`
63+
- All `.pat.txt` and `.hyp.txt` files - replaced by `.tex` originals
6464
- `generate-languages.php` now scans `.tex` instead of `.pat.txt`
6565

6666
### Fixed
67-
- **Syllable accuracy** now **100% identical** to reference `vanderlee/phpSyllable` (10 key words fixed: `character`, `wonderful`, `communication`, `incredible`, etc.)
67+
- **Syllable accuracy** - now **100% identical** to reference `vanderlee/phpSyllable` (10 key words fixed: `character`, `wonderful`, `communication`, `incredible`, etc.)
6868
- `EngineTest` now creates `.tex` fixtures and properly resets static `Config` in `tearDown()`
6969
- Cache version bumped to `2.0` to force rebuild with new patterns
7070
- Demo words replaced with accurately-counted examples

CODE_REVIEW.md

Lines changed: 0 additions & 57 deletions
This file was deleted.

data/patterns/hyph-cop.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
% title: Hyphenation patterns for Coptic
2-
% copyright: Copyright (C) 20042010 Claudio Beccari
2+
% copyright: Copyright (C) 2004-2010 Claudio Beccari
33
% notice: This file is part of the hyph-utf8 package.
44
% See http://www.hyphenation.org/tex for more information.
55
% language:

0 commit comments

Comments
 (0)