jdk/src/share/classes/sun/text/resources/BreakIteratorRules_th.java
author duke
Sat, 01 Dec 2007 00:00:00 +0000
changeset 2 90ce3da70b43
child 5506 202f599c92aa
permissions -rw-r--r--
Initial load
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
 * Portions Copyright 1999-2005 Sun Microsystems, Inc.  All Rights Reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
 * have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 * IBM Confidential
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * OCO Source Materials
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * IBM Java(tm)2 SDK, Standard Edition, v 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * (C) Copyright IBM Corp. 1999
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * The source code for this program is not published or otherwise divested of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * its trade secrets, irrespective of what has been deposited with the U.S.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * Copyright office.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * Since JDK 1.5.0, this file no longer goes to runtime and is used at J2SE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * build phase in order to create [Word|Line]BreakIteratorData_th files which
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * are used on runtime instead.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
package sun.text.resources;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
import java.util.ListResourceBundle;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
import java.util.MissingResourceException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
import java.net.URL;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
public class BreakIteratorRules_th extends ListResourceBundle {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
    protected final Object[][] getContents() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
        return new Object[][] {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
            { "WordBreakRules",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
              // this rule breaks the iterator with mixed Thai and English
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
                "<dictionary>=[\u0e01-\u0e2e\u0e30-\u0e3a\u0e40-\u0e44\u0e47-\u0e4e];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
                + "<ignore>=[:Mn::Me::Cf:^<dictionary>];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
                + "<paiyannoi>=[\u0e2f];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
                + "<maiyamok>=[\u0e46];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
                + "<danda>=[\u0964\u0965];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
                + "<kanji>=[\u3005\u4e00-\u9fa5\uf900-\ufa2d];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
                + "<kata>=[\u30a1-\u30fa];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
                + "<hira>=[\u3041-\u3094];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
                + "<cjk-diacrit>=[\u3099-\u309c];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
                + "<let>=[:L::Mc:^[<kanji><kata><hira><cjk-diacrit><dictionary>]];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
                + "<dgt>=[:N:];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
                + "<mid-word>=[:Pd:\u00ad\u2027\\\"\\\'\\.];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
                + "<mid-num>=[\\\"\\\'\\,\u066b\\.];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
                + "<pre-num>=[:Sc:\\#\\.^\u00a2];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
                + "<post-num>=[\\%\\&\u00a2\u066a\u2030\u2031];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
                + "<ls>=[\n\u000c\u2028\u2029];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
                + "<ws>=[:Zs:\t];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
                + "<word>=((<let><let>*(<mid-word><let><let>*)*){<danda>});"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
                + "<number>=(<dgt><dgt>*(<mid-num><dgt><dgt>*)*);"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
                + "<thai-etc>=<paiyannoi>\u0e25<paiyannoi>;"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
                + ".;"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
                + "{<word>}(<number><word>)*{<number>{<post-num>}};"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
                + "<pre-num>(<number><word>)*{<number>{<post-num>}};"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
                + "<dictionary><dictionary>*{{<paiyannoi>}<maiyamok>};"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
                + "<dictionary><dictionary>*<paiyannoi>/([^[\u0e25<ignore>]]"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
                        + "|\u0e25[^[<paiyannoi><ignore>]]);"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
                + "<thai-etc>;"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
                + "<ws>*{\r}{<ls>};"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
                + "[<kata><cjk-diacrit>]*;"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
                + "[<hira><cjk-diacrit>]*;"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
                + "<kanji>*;"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
            },
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
            { "LineBreakRules",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
                "<dictionary>=[\u0e01-\u0e2e\u0e30-\u0e3a\u0e40-\u0e44\u0e47-\u0e4e];" // this rule breaks the iterator with mixed Thai and English
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
                + "<ignore>=[:Mn::Me::Cf:^[<dictionary>]];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
                + "<danda>=[\u0964\u0965];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
                + "<break>=[\u0003\t\n\f\u2028\u2029];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
                + "<nbsp>=[\u00a0\u0f0c\u2007\u2011\u202f\ufeff];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
                + "<space>=[:Zs::Cc:^[<nbsp><break>\r]];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
                + "<dash>=[:Pd:\u00ad^<nbsp>];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
                + "<paiyannoi>=[\u0e2f];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
                + "<maiyamok>=[\u0e46];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
                + "<thai-etc>=(<paiyannoi>\u0e25<paiyannoi>);"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
                + "<pre-word>=[:Sc::Ps::Pi:^\u00a2\\\"];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
                + "<post-word>=[:Pe::Pf:\\!\\%\\.\\,\\:\\;\\?\\\"\u00a2\u00b0\u066a\u2030-\u2034\u2103"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
                        + "\u2105\u2109\u3001\u3002\u3005\u3041\u3043\u3045\u3047\u3049\u3063"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
                        + "\u3083\u3085\u3087\u308e\u3099-\u309e\u30a1\u30a3\u30a5\u30a7\u30a9"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
                        + "\u30c3\u30e3\u30e5\u30e7\u30ee\u30f5\u30f6\u30fc-\u30fe\uff01\uff0e"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
                        + "\uff1f<maiyamok>];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
                + "<kanji>=[\u4e00-\u9fa5\uf900-\ufa2d\u3041-\u3094\u30a1-\u30fa^[<post-word><ignore>]];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
                + "<digit>=[:Nd::No:];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
                + "<mid-num>=[\\.\\,];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
                + "<char>=[^[<break><space><dash><kanji><nbsp><ignore><pre-word><post-word>"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
                        + "<mid-num>\r<danda><dictionary><paiyannoi><maiyamok>]];"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
                + "<number>=([<pre-word><dash>]*<digit><digit>*(<mid-num><digit><digit>*)*);"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
                + "<word-core>=(<char>*|<kanji>|<number>|<dictionary><dictionary>*|<thai-etc>);"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
                + "<word-suffix>=((<dash><dash>*|<post-word>*)<space>*);"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
                + "<word>=(<pre-word>*<word-core><word-suffix>);"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
                + "<word>(<nbsp><nbsp>*<word>)*{({\r}{<break>}|<paiyannoi>\r{break}|<paiyannoi><break>)};"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
                + "<word>(<nbsp><nbsp>*<word>)*<paiyannoi>/([^[\u0e25<ignore>]]|"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
                        + "\u0e25[^[<paiyannoi><ignore>]]);"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
        };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
}