Prevent Splitting After Numbers Followed By A Period

When translating German texts (and probably not only there) often a number is followed by a period to indicate an ordinal number:

Dieses war der 1. Streich, Doch der 2. folgt sogleich.

How to prevent splitting after these ordinal numbers?

You’ll have to define a segmentation rule like this:

<rule break=”no”><beforebreak>\b\d\.\s</beforebreak><afterbreak>(Absatz|Alarm|Auflage|Ausgabe|Druck|Ebene|Eintrag|Ergänzung|Inbetrieb|Menü|

Phase|Reihe|Schritt|Spalte|Spülen|Streich|Stufe|Ventil|Verordnung|Zahl|

Zeichen|Zeile|Zeit|Ziffer)</afterbreak></rule>

A short explanation of the expressions:

\b stands for a word boundary

\d stands for a digit

\s stands for a space

| (the pipe character) stands for or (the logical operator to separate alternatives)

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License