127f654740f2a26ad62a5c155af9199af9e69b889clairehoCopyright (c) 2002-2010, International Business Machines Corporation and others. All Rights Reserved.
2ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Querubreak: Boundary Analysis
3ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
4ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruThis sample demonstrates
5ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru         Using ICU to determine the linguistic boundaries within text
6ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
7ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru         
8ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruFiles:
9ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    break.cpp      Main source file in C++
10ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    ubreak.c       Main source file in C
11ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    break.sln      Windows MSVC workspace.  Double-click this to get started.
12ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    break.vcproj   Windows MSVC project file
13ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
14ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruTo Build break on Windows
15ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    1.  Install and build ICU
16ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    2.  In MSVC, open the workspace file icu\samples\break\break.sln
17ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    3.  Choose a Debug or Release build.
18ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    4.  Build.
19ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru	
20ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruTo Run on Windows
21ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    1.  Start a command shell window
22ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    2.  Add ICU's bin directory to the path, e.g.
23ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            set PATH=c:\icu\bin;%PATH%
24ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        (Use the path to where ever ICU is on your system.)
25ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    3.  cd into the break directory, e.g.
26ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru            cd c:\icu\source\samples\break\debug
2727f654740f2a26ad62a5c155af9199af9e69b889claireho    4.  Run it (Warning: Be careful, 'break' is also a system command on many systems)
2827f654740f2a26ad62a5c155af9199af9e69b889claireho            .\break
29ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
30ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruTo Build on Unixes
31ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    1.  Build ICU.  
32ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        Specify an ICU install directory when running configure,
33ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        using the --prefix option.  The steps to build ICU will look something
34ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        like this:
35ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           cd <icu directory>/source
36ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           runConfigureICU <platform-name> --prefix <icu install directory> [other options]
37ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           gmake all
38ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           
39ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    2.  Install ICU, 
40ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           gmake install
41ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 
42ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    3.  Compile
43ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           cd <icu directory>/source/samples/break
44ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           gmake ICU_PREFIX=<icu install directory)
45ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           
46ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru To Run on Unixes
47ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           cd <icu directory>/source/samples/break
48ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           
49ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           gmake ICU_PREFIX=<icu install directory>  check
50ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru               -or- 
51ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
52ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           export LD_LIBRARY_PATH=<icu install directory>/lib:.:$LD_LIBRARY_PATH
53ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           break
54ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           
55ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru           
56ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru Note:  The name of the LD_LIBRARY_PATH variable is different on some systems.
57ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        If in doubt, run the sample using "gmake check", and note the name of
58ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        the variable that is used there.  LD_LIBRARY_PATH is the correct name
59ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru        for Linux and Solaris.
60ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
61