]> git.saurik.com Git - apple/icu.git/blob - icuSources/test/testdata/break_rules/grapheme.txt
7beefbe041c01e8a2dd80cb8fc1190b2ed96e82c
[apple/icu.git] / icuSources / test / testdata / break_rules / grapheme.txt
1 #
2 # Copyright (c) 2016, International Business Machines Corporation and others. All Rights Reserved.
3
4 # file: grapheme.txt
5 #
6 # Reference Grapheme Break rules for intltest rbbi/RBBIMonkeyTest
7 #
8 #
9 # Note: Rule syntax and the monkey test itself are still a work in progress.
10 # They are expected to change with review and the addition of support for rule tailoring.
11
12 type = grapheme; # one of grapheme | word | line | sentence
13 locale = en;
14
15 CR = [\u000d];
16 LF = [\u000a];
17
18 Control = [[\p{Grapheme_Cluster_Break = Control}]-[:Block=Tags:]];
19 Extend = [[\p{Grapheme_Cluster_Break = Extend}][:Block=Tags:]];
20 ZWJ = [\u200D];
21 Regional_Indicator = [\p{Grapheme_Cluster_Break = Regional_Indicator}];
22 Prepend = [];
23 SpacingMark = [\p{Grapheme_Cluster_Break = SpacingMark}];
24
25 #
26 # Korean Syllable Definitions
27 #
28 L = [\p{Grapheme_Cluster_Break = L}];
29 V = [\p{Grapheme_Cluster_Break = V}];
30 T = [\p{Grapheme_Cluster_Break = T}];
31 LV = [\p{Grapheme_Cluster_Break = LV}];
32 LVT = [\p{Grapheme_Cluster_Break = LVT}];
33
34 # Emoji defintions
35
36 E_Base = [\u261D\u26F9\u270A-\u270D\U0001F385\U0001F3C3-\U0001F3C4\U0001F3CA-\U0001F3CB\U0001F442-\U0001F443\U0001F446-\U0001F450\U0001F466-\U0001F469\U0001F46E\U0001F470-\U0001F478\U0001F47C\U0001F481-\U0001F483\U0001F485-\U0001F487\U0001F4AA\U0001F575\U0001F590\U0001F595-\U0001F596\U0001F645-\U0001F647\U0001F64B-\U0001F64F\U0001F6A3\U0001F6B4-\U0001F6B6\U0001F6C0\U0001F918];
37 E_Modifier = [\U0001F3FB-\U0001F3FF];
38 GAZ = [\u2640\u2642\u2764\U0001F308\U0001F466-\U0001F469\U0001F48B\U0001F5E8];
39
40 GB3: CR LF;
41 GB4: (Control | CR | LF) ÷;
42 GB5: . ÷ (Control | CR | LF);
43
44 GB6: L (L | V | LV | LVT);
45 GB7: (LV | V) (V | T);
46 GB8: (LVT | T) T;
47
48 GB10: (E_Base | GAZ) Extend* E_Modifier;
49 GB9: . (Extend | ZWJ);
50
51 GB9a: . SpacingMark;
52 GB9b: Prepend .;
53 GB11: ZWJ GAZ;
54
55 # Regional Indicators, split into pairs.
56 # Note that a pair of RIs that is not followed by a third RI will fall into
57 # the normal rules for Extend, etc.
58 #
59 GB12: Regional_Indicator Regional_Indicator ÷ Regional_Indicator;
60 GB13: Regional_Indicator Regional_Indicator;
61
62 GB999: . ÷;