]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/data/brkitr/word_POSIX.txt
ICU-531.30.tar.gz
[apple/icu.git] / icuSources / data / brkitr / word_POSIX.txt
index a1db16f1185a31c2d0a597f62adb38bd2c415887..50ddb812bb3ec85ad61264f66adf610f6cde0f75 100644 (file)
@@ -6,7 +6,7 @@
 #
 # ICU Word Break Rules, POSIX locale.
 #      See Unicode Standard Annex #29.
-#      These rules are based on UAX #29 Revision 20 for Unicode Version 6.2
+#      These rules are based on UAX #29 Revision 22 for Unicode Version 6.3
 #
 # Note:  Updates to word.txt will usually need to be merged into
 #        word_POSIX.txt also.
 #  Character Class Definitions.
 #
 
-$CR           = [\p{Word_Break = CR}];
-$LF           = [\p{Word_Break = LF}];
-$Newline      = [\p{Word_Break = Newline}];
-$Extend       = [\p{Word_Break = Extend}];
-$Format       = [\p{Word_Break = Format}];
-$Hiragana     = [:Hiragana:];
-$Katakana     = [\p{Word_Break = Katakana}];
-$Han          = [:Han:];
-$ALetter      = [\p{Word_Break = ALetter}];
-$MidNumLet    = [\p{Word_Break = MidNumLet} - [.]];
-$MidLetter    = [\p{Word_Break = MidLetter} - [\:]];
-$MidNum       = [\p{Word_Break = MidNum} [.]];
-$Numeric      = [\p{Word_Break = Numeric}];
-$ExtendNumLet = [\p{Word_Break = ExtendNumLet}];
+$CR                 = [\p{Word_Break = CR}];
+$LF                 = [\p{Word_Break = LF}];
+$Newline            = [\p{Word_Break = Newline}];
+$Extend             = [\p{Word_Break = Extend}];
+$Format             = [\p{Word_Break = Format}];
+$Katakana           = [\p{Word_Break = Katakana}];
+$Hebrew_Letter      = [\p{Word_Break = Hebrew_Letter}];
+$ALetter            = [\p{Word_Break = ALetter}];
+$Single_Quote       = [\p{Word_Break = Single_Quote}];
+$Double_Quote       = [\p{Word_Break = Double_Quote}];
+$MidNumLet          = [\p{Word_Break = MidNumLet} - [.]];
+$MidLetter          = [\p{Word_Break = MidLetter} - [\:]];
+$MidNum             = [\p{Word_Break = MidNum} [.]];
+$Numeric            = [\p{Word_Break = Numeric}];
+$ExtendNumLet       = [\p{Word_Break = ExtendNumLet}];
+
+$Han                = [:Han:];
+$Hiragana           = [:Hiragana:];
 
 $RI_A        = \U0001F1E6;  # Trail ERTU
 $RI_B        = \U0001F1E7;  # Trail EGR
@@ -103,13 +107,16 @@ $ALetterPlus  = [$ALetter-$dictionaryCJK [$ComplexContext-$Extend-$Control]];
 #             except when they appear at the beginning of a region of text.
 #
 # TODO: check if handling of katakana in dictionary makes rules incorrect/void
-$KatakanaEx     = $Katakana     ($Extend |  $Format)*;
-$ALetterEx      = $ALetterPlus  ($Extend |  $Format)*;
-$MidNumLetEx    = $MidNumLet    ($Extend |  $Format)*;
-$MidLetterEx    = $MidLetter    ($Extend |  $Format)*;
-$MidNumEx       = $MidNum       ($Extend |  $Format)*;
-$NumericEx      = $Numeric      ($Extend |  $Format)*;
-$ExtendNumLetEx = $ExtendNumLet ($Extend |  $Format)*;
+$KatakanaEx           = $Katakana           ($Extend |  $Format)*;
+$Hebrew_LetterEx      = $Hebrew_Letter      ($Extend |  $Format)*;
+$ALetterEx            = $ALetterPlus        ($Extend |  $Format)*;
+$Single_QuoteEx       = $Single_Quote       ($Extend |  $Format)*;
+$Double_QuoteEx       = $Double_Quote       ($Extend |  $Format)*;
+$MidNumLetEx          = $MidNumLet          ($Extend |  $Format)*;
+$MidLetterEx          = $MidLetter          ($Extend |  $Format)*;
+$MidNumEx             = $MidNum             ($Extend |  $Format)*;
+$NumericEx            = $Numeric            ($Extend |  $Format)*;
+$ExtendNumLetEx       = $ExtendNumLet       ($Extend |  $Format)*;
 
 $Ideographic    = [\p{Ideographic}];
 $HiraganaEx     = $Hiragana     ($Extend |  $Format)*;
@@ -134,6 +141,7 @@ $CR $LF;
 $NumericEx {100};
 $ALetterEx {200};
 $HangulSyllable {200};
+$Hebrew_LetterEx{200};
 $KatakanaEx {400};       # note:  these status values override those from rule 5
 $HiraganaEx {400};       #        by virtue of being numerically larger.
 $IdeographicEx {400};    #
@@ -142,10 +150,16 @@ $IdeographicEx {400};    #
 # rule 5
 #    Do not break between most letters.
 #
-$ALetterEx $ALetterEx {200};
+($ALetterEx | $Hebrew_LetterEx)  ($ALetterEx | $Hebrew_LetterEx) {200};
 
 # rule 6 and 7
-$ALetterEx ($MidLetterEx | $MidNumLetEx) $ALetterEx {200};
+($ALetterEx | $Hebrew_LetterEx) ($MidLetterEx | $MidNumLetEx | $Single_QuoteEx) ($ALetterEx | $Hebrew_LetterEx) {200};
+
+# rule 7a
+$Hebrew_LetterEx $Single_QuoteEx {200};
+
+# rule 7b and 7c
+$Hebrew_LetterEx $Double_QuoteEx $Hebrew_LetterEx {200};
 
 # rule 8
 
@@ -153,15 +167,15 @@ $NumericEx $NumericEx {100};
 
 # rule 9
 
-$ALetterEx $NumericEx {200};
+($ALetterEx | $Hebrew_LetterEx) $NumericEx {200};
 
 # rule 10
 
-$NumericEx $ALetterEx {200};
+$NumericEx ($ALetterEx | $Hebrew_LetterEx) {200};
 
 # rule 11 and 12 
 
-$NumericEx ($MidNumEx | $MidNumLetEx) $NumericEx {100};
+$NumericEx ($MidNumEx | $MidNumLetEx | $Single_QuoteEx) $NumericEx {100};
 
 # rule 13
 # to be consistent with $KanaKanji $KanaKanhi, changed
@@ -171,14 +185,16 @@ $KatakanaEx  $KatakanaEx {400};
 
 # rule 13a/b
 
-$ALetterEx      $ExtendNumLetEx {200};    #  (13a)
-$NumericEx      $ExtendNumLetEx {100};    #  (13a)
-$KatakanaEx     $ExtendNumLetEx {400};    #  (13a)
-$ExtendNumLetEx $ExtendNumLetEx {200};    #  (13a)
+$ALetterEx       $ExtendNumLetEx {200};    #  (13a)
+$Hebrew_LetterEx $ExtendNumLetEx {200};    #  (13a)
+$NumericEx       $ExtendNumLetEx {100};    #  (13a)
+$KatakanaEx      $ExtendNumLetEx {400};    #  (13a)
+$ExtendNumLetEx  $ExtendNumLetEx {200};    #  (13a)
 
-$ExtendNumLetEx $ALetterEx  {200};    #  (13b)
-$ExtendNumLetEx $NumericEx  {100};    #  (13b)
-$ExtendNumLetEx $KatakanaEx {400};    #  (13b)
+$ExtendNumLetEx  $ALetterEx      {200};    #  (13b)
+$ExtendNumLetEx  $Hebrew_Letter  {200};    #  (13b)
+$ExtendNumLetEx  $NumericEx      {100};    #  (13b)
+$ExtendNumLetEx  $KatakanaEx     {400};    #  (13b)
 
 # rule 13c
 
@@ -212,7 +228,10 @@ $KanaKanji $KanaKanji {400}; # different rule status if both kana and kanji foun
 
 !!reverse;
 
+$BackHebrew_LetterEx      = ($Format | $Extend)* $Hebrew_Letter;
 $BackALetterEx            = ($Format | $Extend)* $ALetterPlus;
+$BackSingle_QuoteEx       = ($Format | $Extend)* $Single_Quote;
+$BackDouble_QuoteEx       = ($Format | $Extend)* $Double_Quote;
 $BackMidNumLetEx          = ($Format | $Extend)* $MidNumLet;
 $BackNumericEx            = ($Format | $Extend)* $Numeric;
 $BackMidNumEx             = ($Format | $Extend)* $MidNum;
@@ -229,12 +248,17 @@ $LF $CR;
 
 # rule 5
 
-$BackALetterEx $BackALetterEx;
+($BackALetterEx | $BackHebrew_LetterEx) ($BackALetterEx | $BackHebrew_LetterEx);
 
 # rule 6 and 7
 
-$BackALetterEx ($BackMidLetterEx | $BackMidNumLetEx) $BackALetterEx;
+($BackALetterEx | $BackHebrew_LetterEx) ($BackMidLetterEx | $BackMidNumLetEx | $BackSingle_QuoteEx) ($BackALetterEx | $BackHebrew_LetterEx);
+
+# rule 7a
+$BackSingle_QuoteEx $BackHebrew_LetterEx;
 
+# Rule 7b and 7c
+$BackHebrew_LetterEx $BackDouble_QuoteEx $BackHebrew_LetterEx;
 
 # rule 8
 
@@ -242,15 +266,15 @@ $BackNumericEx $BackNumericEx;
 
 # rule 9
 
-$BackNumericEx $BackALetterEx;
+$BackNumericEx ($BackALetterEx | $BackHebrew_LetterEx);
 
 # rule 10
 
-$BackALetterEx $BackNumericEx;
+($BackALetterEx | $BackHebrew_LetterEx) $BackNumericEx;
 
 # rule 11 and 12
 
-$BackNumericEx ($BackMidNumEx | $BackMidNumLetEx) $BackNumericEx;
+$BackNumericEx ($BackMidNumEx | $BackMidNumLetEx | $BackSingle_QuoteEx) $BackNumericEx;
 
 # rule 13
 
@@ -258,8 +282,8 @@ $BackKatakanaEx $BackKatakanaEx;
 
 # rules 13 a/b
 #
-$BackExtendNumLetEx ($BackALetterEx | $BackNumericEx | $BackKatakanaEx | $BackExtendNumLetEx);
-($BackALetterEx | $BackNumericEx | $BackKatakanaEx) $BackExtendNumLetEx; 
+$BackExtendNumLetEx ($BackALetterEx | $BackHebrew_LetterEx | $BackNumericEx | $BackKatakanaEx | $BackExtendNumLetEx);
+($BackALetterEx | $BackHebrew_LetterEx | $BackNumericEx | $BackKatakanaEx) $BackExtendNumLetEx; 
 
 # rule 13c
 
@@ -296,10 +320,14 @@ $KanaKanji $KanaKanji; #different rule status if both kanji and kana found
 ($Extend | $Format)+ .?;
 
 # rule 6
-($MidLetter | $MidNumLet) $BackALetterEx;
+($MidLetter | $MidNumLet | $Single_Quote) ($BackALetterEx | $BackHebrew_LetterEx);
+
+# rule 7b
+$Double_Quote $BackHebrew_LetterEx;
+
 
 # rule 11
-($MidNum | $MidNumLet) $BackNumericEx;
+($MidNum | $MidNumLet | $Single_Quote) $BackNumericEx;
 
 # For dictionary-based break
 $dictionary $dictionary;
@@ -312,10 +340,13 @@ $dictionary $dictionary;
 ($Extend | $Format)+ .?;
 
 # rule 6
-($MidLetterEx | $MidNumLetEx) $ALetterEx;
+($MidLetterEx | $MidNumLetEx | $Single_QuoteEx) ($ALetterEx | $Hebrew_LetterEx);
+
+# rule 7b
+$Double_QuoteEx $Hebrew_LetterEx;
 
 # rule 11
-($MidNumEx | $MidNumLetEx) $NumericEx;
+($MidNumEx | $MidNumLetEx | $Single_QuoteEx) $NumericEx;
 
 # For dictionary-based break
 $dictionary $dictionary;