scuffed-code/icu4c/source/test/testdata/rbbitst.txt
Andy Heninger 73a3d184bb ICU-2093 rbbi rules and tests updated
X-SVN-Rev: 11974
2003-05-16 22:05:35 +00:00

235 lines
12 KiB
Plaintext

#
# RBBI Test Data
#
# File: rbbitst.txt
#
# The format of this file looks vaguely like some kind of xml-ish markup,
# but it is NOT. The syntax is this..
#
# <word> any following data is for word break testing
# <sent> any following data is for sentence break testing
# <line> any following data is for line break testing
# <char> any following data is for char break testing
# <data> ... </data> test data. May span multiple lines.
# <> Break position, status == 0
# • Break position, status == 0 (Bullet, \u2022)
# <nnn> Break position, status == nnn
# \ Escape. Normal ICU unescape applied.
# \ at end of line -> Line Continuation. Remove both the backslash and the new line
#
#
<word>
<data>•hello<200> •there<200> •goodbye<200></data>
<data>•word<200> •two<200> •</data>
<data>•hello<200> •12345<100> •,•</data>
<char>
<data><>a•b<>c<>d<>,<>\u0666<></data>
<data>•a•b•c•d•,•\u0666•</data>
#
# Test data originally in RBBIAPITest::TestFirstNextFollowing() and TestLastPreviousPreceding()
#
<word>
<data>•This<200> •is<200> •a<200> •word<200> •break<200>.• •Isn't<200> •it<200>?• •2.25<100></data>
<char>
<data>•W•r•i•t•e• •h•i•n•d•i• •h•e•r•e•.• •भ••ा•\u0930•\u0924• •\u0938\u0941\u0902•\u0926•\u0930•</data> <data>•\u0939•\u094c•\u0964•</data>
<data>•a\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304\u0301\u0302\u0303\u0304•</data>
<sent>
<data>•This\n•</data>
<data>•Hello! •how are you? •I'am fine. •Thankyou. •How are you \
doing? •This\n• costs $20,00,000. •</data>
<line>
<data>•Hello! •how\r\n• •(are)\r• •you? •I'am •fine- •Thankyou. •foo\u00a0bar
•How, •are, •you? •This, •costs •$20,00,000.•</data>
#
# Test data originally from RBBI RBBITest::TestDefaultRuleBasedSentenceIteration()
#
<sent>
# Sentence ending in a quote.
<data>•"Sentence ending with a quote." •Bye.•</data>
# Sentence, and test data, ending without a period or other terminator.
<data>•Here is a random sentence, no ending period•</data>
<data>• (This is it). •Testing the sentence iterator. •\
#TODO:"This isn't it." •Hi! \
•This is a simple sample sentence. •(This is it.) •This is a simple sample sentence. •\
#TODO:"This isn't it." •\
Hi! •This is a simple sample sentence. •It does not have to make any sense as you can see. •Nel mezzo del cammin di nostra vita, mi ritrovai in una selva oscura. •Che la dritta via aveo smarrita. •He said, that I said, that you said!•! •Don't rock the boat.\u2029•Because I am the daddy, that is why.
•Not on my time (el timo.)•! •</data>
<data>•Hello. •So what!•!\u2029•"But now," he said, \
#TODO:"I know!" •\
Harris thumbed down several, including "Away We Go" (which became the huge success Oklahoma!)•. •One species, B. anthracis, is highly virulent.
•Wolf said about Sounder:\
#TODO:"Beautifully thought-out and directed." •\
Have you ever said, "This is where\tI shall live"? •He answered, \
#TODO:"You may not!" •Another popular saying is: "How do you do?". \n•\
Yet another popular saying is: \
#TODO:'I'm fine thanks.' •\
What is the proper use of the abbreviation pp.•? •Yes, I am definatelly 12" tall!•!\
#TODO•Now\r•is\n•the\r\n•time\n•\r•for\r•\r</data>
•Now
•is
•the
•time
•for
•</data>
<data>•No breaks when . is surrounded by UPPER.Case letters. •</data>
<data>•No breaks when . is followed by Numeric .4 a.4 C.4 3.1 .•</data>
<data>•No breaks when . is followed by a lower, with possible intervening punct .,a .$a .)a. •</data>
#
# Sentence Breaks: no break at the boundary between CJK and other letters
#
<data>•\u5487\u67ff\ue591\u5017\u61b3\u60a1\u9510\u8165:"JAVA\u821c\u8165\u7fc8\u51ce\u306d,\u2494\u56d8\u4ec0\u60b1\u8560\u51ba\u611d\u57b6\u2510\u5d46".\u2029•\u5487\u67ff\ue591\u5017\u61b3\u60a1\u9510\u8165\u9de8\u97e4JAVA\u821c\u8165\u7fc8\u51ce\u306d\ue30b\u2494\u56d8\u4ec0\u60b1\u8560\u51ba\u611d\u57b6\u2510\u5d46\u97e5\u7751\u3002•\u5487\u67ff\ue591\u5017\u61b3\u60a1\u9510\u8165\u9de8\u97e4\u6470\u8790JAVA\u821c\u8165\u7fc8\u51ce\u306d\ue30b\u2494\u56d8\u4ec0\u60b1\u8560\u51ba\u611d\u57b6\u2510\u5d46\u97e5\u7751\u2048•He said, "I can go there."\u2029•Bye, now.•</data>
#
# Treat fullwidth variants of .!? the same as their
# normal counterparts
#
<data>•I know I'm right\uff0e •Right\uff1f •Right\uff01 •</data>"
#
# Don't break sentences at boundary between CJK and digits
#
<data>•\u5487\u67ff\ue591\u5017\u61b3\u60a1\u9510\u8165\u9de8\u97e48888\u821c\u8165\u7fc8\u51ce\u306d\ue30b\u2494\u56d8\u4ec0\u60b1\u8560\u51ba\u611d\u57b6\u2510\u5d46\u97e5\u7751\u3002•Bye, now•</data>"
#
# Breaks around '(' following a sentence TERM. (Rule 9)
#
<data>•How do you do?(•Fine). •</data>
<data>•How do you do? •(Fine). •</data>
<data>•How do you do?(•fine). •</data>
<data>•How do you do? •(fine). •</data>
#
<data>•Hello.123•</data> # Rule 6
<data>•Hello?•123•</data>
<data>•HELLO.Bye•</data> # Rule 7
<data>•HELLO?•Bye•</data>
<data>•Hello.goodbye•</data> #Rule 8
<data>•Hello. •Goodbye•</data>
<data>•Hello. goodbye•</data>
<data>•Hello.)@#$%^&*()"" goodbye•</data>
#
# test for bug #4158381: No breaks when there are no terminators around
#
<data>•\<P>Provides a set of &quot;lightweight&quot; (all-java\<FONT SIZE="-2">\<SUP>TM\</SUP>\</FONT> language) components that, to the maximum degree possible, work the same on all platforms. •</data>
<data>•Another test.\u2029•</data>
# test for bug #4143071: Make sure sentences that end with digits
# work right
#
<data>•Today is the 27th of May, 1998. •</data>
<data>•Tomorrow with be 28 May 1998. •</data>
<data>•The day after will be the 30th.\u2029•</data>
# test for bug #4152416: Make sure sentences ending with a capital
# letter are treated correctly
#
<data>•The type of all primitive \<code>boolean\</code> values accessed in the target VM. •Calls to xxx will return an implementor of this interface. \u2029•</data>
# test for bug #4152117: Make sure sentence breaking is handling
# punctuation correctly [COULD NOT REPRODUCE THIS BUG, BUT TEST IS
# HERE TO MAKE SURE IT DOESN'T CROP UP]
#
<data>•Constructs a randomly generated BigInteger, uniformly distributed over the range \<tt>0\</tt> to \<tt>(2\<sup>numBits\</sup> - 1\)\</tt>, inclusive. •The uniformity of the distribution assumes that a fair source of random bits is provided in \<tt>rnd\</tt>. •Note that this constructor always constructs a non-negative biginteger. \n•Ahh abc.
•</data>
# sentence breaks for hindi which used Devanagari script
# make sure there is sentence break after ?,danda(hindi phrase separator),
# fullstop followed by space. (VERY old test)
#
<data>•\u0928\u092e\u0938\u094d\u200d\u0924\u0947 \u0930\u092e\u0947\u0936\u0905\u093e\u092a\u0915\u0948\u0938\u0947 \u0939\u0948?•\u092e\u0948 \u0905\u091a\u094d\u200d \u091b\u093e \u0939\u0942\u0901\u0964 •\u0905\u093e\u092a\r\n•\
\u0915\u0948\u0938\u0947 \u0939\u0948?•\u0935\u0939 \u0915\u094d\u200d\u092f\u093e\n\
•\u0939\u0948?•\u092f\u0939 \u0905\u093e\u092e \u0939\u0948. •\u092f\u0939 means "this". •"\u092a\u095d\u093e\u0908" meaning "education" or "studies". •\u0905\u093e\u091c(\u0938\u094d\u200d\u0935\u0924\u0902\u0924\u094d\u0930 \u0926\u093f\u0935\u093e\u0938) \u0939\u0948\u0964 •Let's end here. •</data>
# Regression test for bug #1984, Sentence break in Arabic text.
<data>\
•\u0623\u0633\u0627\u0633\u064b\u0627\u060c\u0020\u062a\u062a\u0639\u0627"\u0645\u0644\u0020\u0627\u0644\u062d\u0648\u0627\u0633\u064a\u0628\u0020"\u0641\u0642\u0637\u0020\u0645\u0639\u0020\u0627\u0644\u0623\u0631\u0642\u0627\u0645\u060c\u0648\u062a\u0642\u0648\u0645\u0020\u0628\u062a\u062e\u0632\u064a\u0646\u0020\u0627\u0644\u0623\u062d\u0631\u0641\u0020\u0648\u0627\u0644\u0645\u062d\u0627\u0631\u0641\u0020\u0627\u0644\u0623\u062e\u0631\u0649\u0020\u0628\u0639\u062f\u0020\u0623\u0646\u062a\u064f\u0639\u0637\u064a\u0020\u0631\u0642\u0645\u0627\u0020\u0645\u0639\u064a\u0646\u0627\u0020\u0644\u0643\u0644\u0020\u0648\u0627\u062d\u062f\u0020\u0645\u0646\u0647\u0627\u002e\u0020•\u0648\u0642\u0628\u0644\u0020\u0627\u062e\u062a\u0631\u0627\u0639\u0022\u064a\u0648\u0646\u0650\u0643\u0648\u062f\u0022\u060c\u0020\u0643\u0627\u0646\u0020\u0647\u0646\u0627\u0643\u0020\u0645\u0626\u0627\u062a\u0020\u0627\u0644\u0623\u0646\u0638\u0645\u0629\u0020\u0644\u0644\u062a\u0634\u0641\u064a\u0631\u0648\u062a\u062e\u0635\u064a\u0635\u0020\u0647\u0630\u0647\u0020\u0627\u0644\u0623\u0631\u0642\u0627\u0645\u0020\u0644\u0644\u0645\u062d\u0627\u0631\u0641\u060c\u0020\u0648\u0644\u0645\u0020\u064a\u0648\u062c\u062f\u0020\u0646\u0638\u0627\u0645\u062a\u0634\u0641\u064a\u0020\u0639\u0644\u0649\u0020\u062c\u0645\u064a\u0639\u0020\u0627\u0644\u0645\u062d\u0627\u0631\u0641\u0020\u0627\u0644\u0636\u0631\u0648\u0631\u064a\u0629. •</data>"
# Try a few more of the less common sentence endings.
<data>•Hello, world\u3002 •Hello, world\u1803 •Hello, world\u2048 •Hello, world\u203c •Let's end here. •</data>
################################################################
#
#
# L I N E B R E A K
#
#
################################################################
#
# Old Line Break Test data. Orginally located in RBBITest::TestDefaultRuleBasedLineIteration()
#
<line>
<data>•Multi-•Level •example •of •a •semi-•idiotic •non-•sensical •(non-•important) •sentence.
•Hi •Hello •How\n•are\r•you\u2028•fine.\t•good. •Now\r•is\n•the\r\n•time\n•\r•for\r•\r•all•</data>
# test for bug #4068133
#
<data>•\u96f6•\u4e00\u3002•\u4e8c\u3001•\u4e09\u3002\u3001•\u56db\u3001\u3002\u3001•\u4e94,•\u516d.•\u4e03.\u3001,\u3002•\u516b•</data>
# to test for bug #4086052
<data>•foo\u00a0bar•</data>
# to test for bug #4097920
<data>•dog,•cat,•mouse •(one)•(two)\n•</data>
# to test for bug #4035266
<data>•The •balance •is •$-23,456.78, •not •-•$32,456.78!\n•</data>
# to test for bug #4098467
# What follows is a string of Korean characters (I found it in the Yellow Pages
# ad for the Korean Presbyterian Church of San Francisco, and I hope I transcribed
# it correctly), first as precomposed syllables, and then as conjoining jamo.
# Both sequences should be semantically identical and break the same way.
# precomposed syllables... (I == Rich Gillam?)
#
<data>•\uc0c1•\ud56d •\ud55c•\uc778 •\uc5f0•\ud569 •\uc7a5•\ub85c•\uad50•\ud68c•</data>
# conjoining jamo...
# TODO: rules update needed
#<data>•\u1109\u1161\u11bc•\u1112\u1161\u11bc •\u1112\u1161\u11ab•\u110b\u1175\u11ab #•\u110b\u1167\u11ab•\u1112\u1161\u11b8 •\u110c\u1161\u11bc•\u1105\u1169•\u1100\u116d•\u1112\u116c•</data>
# to test for bug #4117554: Fullwidth .!? should be treated as postJwrd
<data>•\u4e01\uff0e•\u4e02\uff01•\u4e03\uff1f•</data>
# Surrogate line break tests.
#
<data>•\u4e01•\ud840\udc01•\u4e02•abc•\ue000•\udb80\udc01•</data>
# Regression for bug 836
<data>•AAA•(AAA •</data>
# Try some words from other scripts.
# Greek, Cyrillic, Hebrew, Arabic, Arabic, Georgian, Latin
#
<data>•ΑΒΓ •БВГ •אבג֓ •ابت •١٢٣ •\u10A0\u10A1\u10A2 •ABC •</data>