arXiv:2609.07638cs.CLSep 2026

Manuscript Offprint

arXiv:2609.07638

The Art of Hierarchical Competing Patterns: Gaussian Process Optimization of Hyphenation

Ondřej Sojka, Petr Sojka

Abstract

Hyphenation patterns remain a compact and widely deployed solution for word breaking in typesetting systems, text processors, and web rendering engines, but their generation still depends on manually tuned patgen program parameter profiles. We formulate patgen profile selection as a black-box hyperparameter optimization problem and evaluate Gaussian-process Bayesian optimization for this task. The search objective combines a precision-oriented F1/7F_{1/7}-score with an explicit trie size-accuracy trade-off using a normalized trie-size penalty.

We evaluate the method on 17 hyphenated word-list datasets covering 14 languages and multiple scripts. Against two strong hand-tuned profiles regenerated from the same 8/10 training split and evaluated on the same 1/10 held-out test split, the GP-optimized profiles improve F1/7F_{1/7} on 16 of 17 datasets and reduce trie size on all 17. The median optimized/baseline trie ratio is 0.407. A dataset-level sign test gives p=1.37⋅10−4p = 1.37 \cdot 10^{-4}; a separate budget-matched comparison on five representative datasets shows that systematic search is competitive and usually improves over the best hand-tuned profile under the fixed comparison objective. The results show that model-based optimization can make pattern generation more reproducible and less dependent on expert trial-and-error while keeping the accuracy–compactness trade-off explicit.

“Perfection is not attainable, but if we chase perfection, we can catch excellence.” – Lombardi (1997)

1 Motivation and Hyphenation Problem Solutions

The quality of hyphenation matters. It matters when typesetting any paged text for print. It matters in the narrow columns of academic papers,

Figure

Figure 1: Accuracy–compactness gains from per-level GP search. Top: Held-out test results for all 17 datasets, relative to the hand-tuned baseline at (1×,1×)(1\times, 1\times); every optimized profile is smaller, and 16 of 17 are more accurate. Bottom: On the validation split of cssk/cshyphen, all 153 evaluated profiles and their attainable frontier. At the hand-tuned profile's accuracy, the frontier contains a 1.7×1.7\times smaller trie; at its trie size, it contains a profile with 1.4×1.4\times fewer residual errors.

such as in the two-column papers in the ACL Anthology or in this paper. It matters when rendering HTML texts on small mobile screens, as illustrated in Appendix A in Figure 3. Better auto-

  • Equal contribution.

matic hyphenation can reduce wasted screen space, scrolling, and paper use.

Approaches have evolved from algorithmic, rule-based solutions for English in the first version of TEx to pattern-based ones and to various statistical and machine learning methods, including neural methods.

References (18)