Skip to content

Commit 109fcb4

Browse files
authored
Support remap rules in the segmenter (#949)
1 parent 69a376c commit 109fcb4

File tree

10 files changed

+395
-287
lines changed

10 files changed

+395
-287
lines changed

unicodetools/data/ucd/dev/auxiliary/GraphemeBreakTest.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<body bgcolor='#FFFFFF'>
88
<h2>Grapheme_Cluster_Break Chart</h2>
99
<p><b>Unicode Version:</b> 17.0.0</p>
10-
<p><b>Date:</b> 2024-09-12, 14:11:44 GMT</p>
10+
<p><b>Date:</b> 2024-10-14, 12:06:04 GMT</p>
1111
<p>This page illustrates the application of the Grapheme_Cluster_Break specification. The material here is informative, not normative.</p> <p>The first chart shows where breaks would appear between different sample characters or strings. The sample characters are chosen mechanically to represent the different properties used by the specification.</p><p>Each cell shows the break-status for the position between the character(s) in its row header and the character(s) in its column header. The × symbol indicates no break, while the ÷ symbol indicated a break. The cells with × are also shaded to make it easier to scan the table. For example, in the cell at the intersection of the row headed by “CR” and the column headed by “LF”, there is a × symbol, indicating that there is no break between CR and LF.</p>
1212
<p>After the heavy blue line in the table are additional rows, either with different sample characters or for sequences. Some column headers may be composed, reflecting “treat as” or “ignore” rules.</p>
1313
<p>If your browser handles titles (tooltips), then hovering the mouse over the row header will show a sample character of that type. Hovering over a column header will show the sample character, plus its abbreviated general category and script. Hovering over the intersected cells shows the rule number that produces the break-status. For example, hovering over the cell at the intersection of LVT and T shows ×, with the rule 8.0. Checking below the table, rule 8.0 is “( LVT | T) × T”, which is the one that applies to that case. Note that a rule is invoked only when no lower-numbered rules have applied.</p>
@@ -39,7 +39,7 @@ <h3><a href='#table' name='table'>Table</a></h3>
3939
<tr><th class='lbclass' title='U+0378 <reserved-0378>'>Other</th><th title='999.0' class='pairItem'>÷</th><th title='5.0' class='pairItem'>÷</th><th title='5.0' class='pairItem'>÷</th><th title='5.0' class='pairItem'>÷</th><th title='9.0' bgcolor='#CCCCFF' class='pairItem'>×</th><th title='999.0' class='pairItem'>÷</th><th title='999.0' class='pairItem'>÷</th><th title='9.1' bgcolor='#CCCCFF' class='pairItem'>×</th><th title='999.0' class='pairItem'>÷</th><th title='999.0' class='pairItem'>÷</th><th title='999.0' class='pairItem'>÷</th><th title='999.0' class='pairItem'>÷</th><th title='999.0' class='pairItem'>÷</th><th title='9.1' bgcolor='#CCCCFF' class='pairItem'>×</th><th title='999.0' class='pairItem'>÷</th><th title='999.0' class='pairItem'>÷</th><th title='999.0' class='pairItem'>÷</th><th title='999.0' class='pairItem'>÷</th><th title='9.0' bgcolor='#CCCCFF' class='pairItem'>×</th><th title='9.0' bgcolor='#CCCCFF' class='pairItem'>×</th><th title='9.0' bgcolor='#CCCCFF' class='pairItem'>×</th><th title='9.0' bgcolor='#CCCCFF' class='pairItem'>×</th></tr>
4040
</table>
4141
<h3><a href='#rules' name='rules'>Rules</a></h3>
42-
<p>This section shows the rules. They are mechanically modified for programmatic generation of the tables and test code, and thus do not match the UAX rules precisely. In particular:</p><ol><li>The rules are cast into a form that is more like regular expressions.</li><li>The rules “sot ÷”, “÷ eot”, and “÷ Any” are added mechanically, and have artificial numbers.</li><li>The rules are given decimal numbers using tenths, and are written without prefix. For example, rule GB9a is given the number 9.1.</li><li>Any “treat as” or “ignore” rules are handled as discussed in UAX #29, and thus reflected in a transformation of the rules usually not visible here. In addition, final rules like “Any ÷ Any” may be recast as the equivalent expression “÷ Any”.</li><li>In some cases, the numbering and form of a rule is changed due to “treat as” rules.</li></ol><p>For the original rules, see UAX #29.</p>
42+
<p>This section shows the rules. They are mechanically modified for programmatic generation of the tables and test code, and thus do not match the UAX rules precisely. In particular:</p><ol><li>The rules are cast into a form that is more like regular expressions.</li><li>The rules “sot ÷”, “÷ eot”, and “÷ Any” are added mechanically, and have artificial numbers.</li><li>The rules are given decimal numbers using tenths, and are written without prefix. For example, rule GB9a is given the number 9.1.</li><li>Final rules like “Any ÷ Any” may be recast as the equivalent expression “÷ Any”.</li><li></li></ol><p>For the original rules, see UAX #29.</p>
4343
<table>
4444
<tr><th style='text-align:right'><a href='#r0.2' name='r0.2'>0.2</a></th><td style='text-align:right'>sot </td><td>÷</td><td></td></tr>
4545
<tr><th style='text-align:right'><a href='#r0.3' name='r0.3'>0.3</a></th><td style='text-align:right'></td><td>÷</td><td> eot</td></tr>

unicodetools/data/ucd/dev/auxiliary/LineBreakTest.html

Lines changed: 8 additions & 9 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)