Feature 1: Looseness (Complete Implementation) - Added alt-paths hash table to track alternative paths by (position, line-count) - Modified DP loop to track all paths reaching each position - ekp--dp-trace-breaks-with-looseness uses alt-paths to find closest match - Added ekp--dp-trace-alt-path helper with safety limit Feature 2: Threshold Pruning - Added ekp-threshold-factor variable (default 0 = disabled) - Paths with demerits > best × (1 + factor) are skipped - Tracks best-end-demerits during DP for pruning decisions Feature 3: Flagged Penalties (Forced Breaks) - Added flagged-positions field to ekp-para struct - Added ekp-flagged-penalty variable (negative = preferred) - Added ekp--flagged-p with O(log n) binary search - Modified DP to always accept flagged breaks Tests: - ekp-test-unit--hyphenate-p-binary-search - ekp-test-unit--flagged-p-binary-search - ekp-test-unit--alt-paths-hash - ekp-test-unit--threshold-factor - ekp-test-unit--flagged-penalty - Updated ekp-test-unit--struct-access for new fields Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| ekp-tests.el | ||
| text-de_DE.txt | ||
| text-en_US.txt | ||
| text-fr.txt | ||
| text-zh2-en_US.txt | ||
| text-zh-en_US.txt | ||
| text-zh.txt | ||