]> gitweb.fperrin.net Git - Dictionary.git/blob - jars/icu4j-4_4_2-src/tools/misc/src/com/ibm/icu/dev/tool/rbbi/readme.html
go
[Dictionary.git] / jars / icu4j-4_4_2-src / tools / misc / src / com / ibm / icu / dev / tool / rbbi / readme.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r
2 <html>\r
3 <head>\r
4   <meta http-equiv="content-type"\r
5  content="text/html; charset=ISO-8859-1">\r
6   <title>README For RBBI Tools</title>\r
7 <!-- Copyright (C) 2003-2004, International Business Machines Corporation and\r
8      others. All Rights Reserved.\r
9 -->\r
10 </head>\r
11 <body>\r
12 <h3>What Are These Tools?</h3>\r
13 This directory contains two tools, WriteTablesToFiles, which converts\r
14 the Java&nbsp; BreakIterators into .brk files for ICU4C, and\r
15 BuildDictionaryFile, which builds the binary the Thai word break\r
16 dictionary from a Unicode text file containing a list of Thai words.\r
17 The rest of this document describes how to use these tools.<br>\r
18 <h3>How To Build The ICU4C BreakIterator Files</h3>\r
19 The RuleBasedBreakIterator code was originally developed for ICU4J, and\r
20 then ported to ICU4C. For various reasons, the code which compiled the\r
21 state tables from the rule text was hard to port. Instead the\r
22 WriteTablesToFiles tool was wirtten to read in the Java data and write\r
23 the .brk files which ICU4C reads. Later the RBBI code was re-written\r
24 for ICU4C, including the ability to compile the state tables from rules\r
25 stored in text files. This means that the WriteTablesToFiles tool is\r
26 now obsolete.<br>\r
27 <br>\r
28 <h3>How To Build The Thai Word Break Dictionary</h3>\r
29 The Thai word berak code was developed originally for ICU4J, and then\r
30 ported to ICU4C - the dictionary builder tool was never ported, so you\r
31 have to use the Java tool to build the dictionary file for ICU4C. On\r
32 the other hand, all of the rest of the ICU locale data was developed\r
33 originally for\r
34 ICU4C, and a tool was written to covert the ICU4C locale data to Java\r
35 resource bundles for use by ICU4J. Consequently, the process of\r
36 building the Thai\r
37 word break dictionary for ICU4C and\r
38 ICU4J is a bit convoluted. Here are the steps:<br>\r
39 <div style="margin-left: 40px;">\r
40 <ol>\r
41   <li>Download and build both ICU4C and ICU4J on a <span\r
42  style="font-weight: bold;">Big Endian</span> machine.<br>\r
43   </li>\r
44   <li>Run the following command line to build the Thai dictionary file:<br>\r
45 java -classpath $icu4j_root/classes\r
46 com.ibm.icu.dev.tool.rbbi.BuildDictionaryFile\r
47 $icu4j_root/src/com/ibm/icu/dev/data/thai6.ucs Unicode\r
48 $icu_root/soruce/data/brkitr/thai_dict.brk</li>\r
49   <li>Rebuild the ICU4C resources.</li>\r
50   <li>Rebuild the ICU4J ICULocaleData.jar file. (See <a\r
51  href="../../../../../../../readme.html">the ICU4J readme file</a> for\r
52 instructions)</li>\r
53   <li>Move ICULocaleData.jar from $icu_root/source/data/locales/java to\r
54 $icu4j_root/src/com/ibm/icu/impl/data</li>\r
55   <li>Build ICU4J's _resources target to unjar the new files.<br>\r
56   </li>\r
57 </ol>\r
58 </div>\r
59 In the above, $icu_root is the root of your ICU4C source tree, for\r
60 example\r
61 "~/dev/icu" and $icu4j_root is the root of your ICU4J source tree, for\r
62 example "~/dev/icu4j".<br>\r
63 <br>\r
64 </body>\r
65 </html>\r