2004-10-21 01:03:01 +00:00
|
|
|
#
|
2005-03-08 22:49:59 +00:00
|
|
|
# Copyright (C) 2002-2005, International Business Machines Corporation
|
2004-11-01 23:54:44 +00:00
|
|
|
# and others. All Rights Reserved.
|
2004-10-21 01:03:01 +00:00
|
|
|
#
|
|
|
|
# file: word_ja.txt
|
|
|
|
#
|
|
|
|
# ICU Word Break Rules
|
|
|
|
# See Unicode Standard Annex #29.
|
2005-01-13 23:42:12 +00:00
|
|
|
# These rules are based on Version 4.1 draft, dated 2004-11-11
|
2004-10-21 01:03:01 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
#
|
|
|
|
# Character class definitions from TR 29
|
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
!!chain;
|
|
|
|
|
|
|
|
$Katakana = [[:Script = KATAKANA:]
|
2005-01-13 23:42:12 +00:00
|
|
|
[:name = VERTICAL KANA REPEAT MARK:]
|
|
|
|
[:name = VERTICAL KANA REPEAT WITH VOICED SOUND MARK:]
|
|
|
|
[:name = VERTICAL KANA REPEAT MARK UPPER HALF:]
|
|
|
|
[:name = VERTICAL KANA REPEAT WITH VOICED SOUND MARK UPPER HALF:]
|
|
|
|
[:name = VERTICAL KANA REPEAT MARK LOWER HALF:]
|
|
|
|
[:name = KATAKANA-HIRAGANA VOICED SOUND MARK:]
|
|
|
|
[:name = KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK:]
|
|
|
|
[:name = KATAKANA-HIRAGANA DOUBLE HYPHEN:]
|
2004-10-21 01:03:01 +00:00
|
|
|
[:name = KATAKANA-HIRAGANA PROLONGED SOUND MARK:]
|
|
|
|
[:name = HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK:]
|
|
|
|
[:name = HALFWIDTH KATAKANA VOICED SOUND MARK:]
|
|
|
|
[:name = HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK:]];
|
|
|
|
|
|
|
|
|
|
|
|
$ALetter = [[:Alphabetic:] [:name= HEBREW PUNCTUATION GERESH:]
|
|
|
|
- [:Ideographic:]
|
|
|
|
- $Katakana
|
2005-01-13 23:42:12 +00:00
|
|
|
- [:Script = Hiragana:]
|
2004-10-21 01:03:01 +00:00
|
|
|
- [:Script = Lao:]
|
2005-01-13 23:42:12 +00:00
|
|
|
- [:Grapheme_Extend = TRUE:]];
|
|
|
|
|
2004-10-21 01:03:01 +00:00
|
|
|
$MidLetter = [[:name = APOSTROPHE:] [:name = MIDDLE DOT:]
|
|
|
|
[:name = HEBREW PUNCTUATION GERSHAYIM:]
|
|
|
|
[:name = RIGHT SINGLE QUOTATION MARK:]
|
2005-01-13 23:42:12 +00:00
|
|
|
[:name = HYPHENATION POINT:]
|
|
|
|
[:name = COLON:]];
|
|
|
|
|
|
|
|
|
|
|
|
$MidNum = [[:LineBreak = Infix_Numeric:] - [:name = COLON:]];
|
|
|
|
$Numeric = [[:Nd:][:name = ARABIC DECIMAL SEPARATOR:][:name = ARABIC THOUSANDS SEPARATOR:]];
|
|
|
|
$ExtendNumLet = [[:Connector_Punctuation:]
|
|
|
|
- [:name = KATAKANA MIDDLE DOT:]
|
|
|
|
- [:name = HALFWIDTH KATAKANA MIDDLE DOT:]];
|
|
|
|
|
|
|
|
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Character Class Definitions.
|
|
|
|
# The names are those from TR29.
|
|
|
|
#
|
|
|
|
|
2005-01-13 23:42:12 +00:00
|
|
|
$CR = \u000d;
|
|
|
|
$LF = \u000a;
|
|
|
|
$Extend = [[:Grapheme_Extend = TRUE:]];
|
|
|
|
$Control = [[:Zl:] [:Zp:] [:Cc:] [:Cf:] - $Extend];
|
|
|
|
$Format = [[:Cf:] - $Extend];
|
|
|
|
$Hiragana = [:Hiragana:];
|
|
|
|
$Ideographic = [:IDEOGRAPHIC:];
|
|
|
|
|
|
|
|
$ALetterEx = $ALetter $Extend*;
|
|
|
|
$NumericEx = $Numeric $Extend*;
|
|
|
|
$MidNumEx = $MidNum $Extend*;
|
|
|
|
$MidLetterEx = $MidLetter $Extend*;
|
|
|
|
$KatakanaEx = $Katakana $Extend*;
|
|
|
|
$HiraganaEx = $Hiragana $Extend*;
|
|
|
|
$IdeographicEx = $Ideographic $Extend*;
|
|
|
|
$ExtendNumLetEx = $ExtendNumLet $Extend*;
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
## -------------------------------------------------
|
|
|
|
|
|
|
|
!!forward;
|
|
|
|
|
|
|
|
|
2005-01-13 23:42:12 +00:00
|
|
|
# Rule 3 - don't break grapheme clusters.
|
2004-10-21 01:03:01 +00:00
|
|
|
# see character breaks
|
|
|
|
|
2005-01-13 23:42:12 +00:00
|
|
|
$CR $LF;
|
|
|
|
[^$Control] $Extend+;
|
|
|
|
$NumericEx {100};
|
|
|
|
$ALetterEx {200};
|
|
|
|
$KatakanaEx {300};
|
|
|
|
$HiraganaEx {300};
|
|
|
|
$IdeographicEx {400};
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
# rule 5
|
|
|
|
|
2005-01-13 23:42:12 +00:00
|
|
|
$ALetterEx $Format* $ALetterEx {200};
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
# rule 6 and 7
|
2005-01-13 23:42:12 +00:00
|
|
|
$ALetterEx $Format* $MidLetterEx $Format* $ALetterEx {200};
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
# rule 8
|
|
|
|
|
2005-01-13 23:42:12 +00:00
|
|
|
$NumericEx $Format* $NumericEx {100};
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
# rule 9
|
|
|
|
|
2005-01-13 23:42:12 +00:00
|
|
|
$ALetterEx $Format* $NumericEx {200};
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
# rule 10
|
|
|
|
|
2005-01-13 23:42:12 +00:00
|
|
|
$NumericEx $Format* $ALetterEx {200};
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
# rule 11 and 12
|
|
|
|
|
2005-01-13 23:42:12 +00:00
|
|
|
$NumericEx $Format* $MidNumEx $Format* $NumericEx {100};
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
# rule 13
|
|
|
|
|
2005-01-13 23:42:12 +00:00
|
|
|
$KatakanaEx $Format* $KatakanaEx {300};
|
|
|
|
$HiraganaEx $Format* $HiraganaEx {300};
|
|
|
|
$IdeographicEx $Format* $IdeographicEx {400};
|
|
|
|
|
|
|
|
# rule 13a/b
|
|
|
|
|
|
|
|
$ALetterEx $Format* $ExtendNumLetEx {200}; # (13a)
|
|
|
|
$NumericEx $Format* $ExtendNumLetEx {100}; # (13a)
|
|
|
|
$KatakanaEx $Format* $ExtendNumLetEx {300}; # (13a)
|
|
|
|
$ExtendNumLetEx $Format* $ExtendNumLetEx{200}; # (13a)
|
|
|
|
|
|
|
|
$ExtendNumLetEx $Format* $ALetterEx {200}; # (13b)
|
|
|
|
$ExtendNumLetEx $Format* $NumericEx {100}; # (13b)
|
|
|
|
$ExtendNumLetEx $Format* $KatakanaEx {300}; # (13b)
|
|
|
|
|
|
|
|
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
## -------------------------------------------------
|
|
|
|
|
|
|
|
!!reverse;
|
|
|
|
|
|
|
|
$BackALetterEx = $Extend* $ALetter;
|
|
|
|
$BackNumericEx = $Extend* $Numeric;
|
|
|
|
$BackMidNumEx = $Extend* $MidNum;
|
|
|
|
$BackMidLetterEx = $Extend* $MidLetter;
|
|
|
|
$BackKatakanaEx = $Extend* $Katakana;
|
|
|
|
$BackHiraganaEx = $Extend* $Hiragana;
|
|
|
|
$BackIdeographicEx = $Extend* $Ideographic;
|
2005-01-13 23:42:12 +00:00
|
|
|
$BackExtendNumLetEx= $Extend* $ExtendNumLet;
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
$LF $CR;
|
|
|
|
|
|
|
|
# see character breaks
|
|
|
|
|
|
|
|
$Extend* [^$Control];
|
|
|
|
|
|
|
|
# rule 5
|
|
|
|
|
2005-01-13 23:42:12 +00:00
|
|
|
$BackALetterEx $Format* $BackALetterEx;
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
# rule 6 and 7
|
|
|
|
|
2005-01-13 23:42:12 +00:00
|
|
|
$BackALetterEx $Format* $BackMidLetterEx $Format* $BackALetterEx;
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
# rule 8
|
|
|
|
|
|
|
|
$BackNumericEx $Format* $BackNumericEx;
|
|
|
|
|
2005-01-13 23:42:12 +00:00
|
|
|
# rule 9
|
2004-10-21 01:03:01 +00:00
|
|
|
|
2005-01-13 23:42:12 +00:00
|
|
|
$BackNumericEx $Format* $BackALetterEx;
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
# rule 10
|
|
|
|
|
2005-01-13 23:42:12 +00:00
|
|
|
$BackALetterEx $Format* $BackNumericEx;
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
# rule 11 and 12
|
|
|
|
|
2005-01-13 23:42:12 +00:00
|
|
|
$BackNumericEx $Format* $BackMidNumEx $Format* $BackNumericEx;
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
# rule 13
|
|
|
|
|
|
|
|
$BackKatakanaEx $Format* $BackKatakanaEx;
|
|
|
|
$BackHiraganaEx $Format* $BackHiraganaEx;
|
|
|
|
$BackIdeographicEx $Format* $BackIdeographicEx;
|
|
|
|
|
2005-01-13 23:42:12 +00:00
|
|
|
# rules 13 a/b
|
|
|
|
#
|
|
|
|
($BackALetterEx | $BackNumericEx | $BackKatakanaEx | $BackExtendNumLetEx) $Format* $BackExtendNumLetEx;
|
|
|
|
$BackExtendNumLetEx $Format* ($BackALetterEx | $BackNumericEx | $BackKatakanaEx);
|
|
|
|
|
2004-10-21 01:03:01 +00:00
|
|
|
## -------------------------------------------------
|
|
|
|
|
|
|
|
!!safe_reverse;
|
|
|
|
|
|
|
|
# rule 3
|
|
|
|
$Extend+ [^$Extend];
|
|
|
|
$Extend+; # comes into play when buffer _begins_ with an $Extend+.
|
|
|
|
|
|
|
|
# rule 4
|
2005-01-13 23:42:12 +00:00
|
|
|
$Format+ $BackALetterEx;
|
2004-10-21 01:03:01 +00:00
|
|
|
$Format+ $BackNumericEx;
|
|
|
|
$Format+ $BackMidLetterEx;
|
|
|
|
$Format+ $BackMidNumEx;
|
|
|
|
$Format+ $BackKatakanaEx;
|
|
|
|
$Format+ $BackHiraganaEx;
|
|
|
|
$Format+ $BackIdeographicEx;
|
2005-01-13 23:42:12 +00:00
|
|
|
$Format+ $BackExtendNumLetEx;
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
# rule 6
|
2005-01-13 23:42:12 +00:00
|
|
|
$MidLetter $Format* $BackALetterEx;
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
# rule 11
|
2005-01-13 23:42:12 +00:00
|
|
|
$MidNum $Format* $BackNumericEx;
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
## -------------------------------------------------
|
|
|
|
|
|
|
|
!!safe_forward;
|
|
|
|
|
|
|
|
# rule 3
|
|
|
|
$Extend+;
|
|
|
|
|
|
|
|
# rule 4
|
|
|
|
$Extend* $Format+ $ALetterEx;
|
|
|
|
$Extend* $Format+ $NumericEx;
|
|
|
|
$Extend* $Format+ $MidLetterEx;
|
|
|
|
$Extend* $Format+ $MidNumEx;
|
|
|
|
$Extend* $Format+ $KatakanaEx;
|
|
|
|
$Extend* $Format+ $HiraganaEx;
|
|
|
|
$Extend* $Format+ $IdeographicEx;
|
2005-01-13 23:42:12 +00:00
|
|
|
$Extend* $Format+ $ExtendNumLetEx;
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
$Extend+ $Format* $ALetterEx;
|
|
|
|
$Extend+ $Format* $NumericEx;
|
|
|
|
$Extend+ $Format* $MidLetterEx;
|
|
|
|
$Extend+ $Format* $MidNumEx;
|
|
|
|
$Extend+ $Format* $KatakanaEx;
|
|
|
|
$Extend+ $Format* $HiraganaEx;
|
|
|
|
$Extend+ $Format* $IdeographicEx;
|
2005-01-13 23:42:12 +00:00
|
|
|
$Extend+ $Format* $ExtendNumLetEx;
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
# rule 6
|
2005-01-13 23:42:12 +00:00
|
|
|
$MidLetterEx $Format* $ALetterEx;
|
2004-10-21 01:03:01 +00:00
|
|
|
|
|
|
|
# rule 11
|
2005-01-13 23:42:12 +00:00
|
|
|
$MidNumEx $Format* $NumericEx;
|