mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-06 05:55:35 +00:00
Revert "ICU-21878 Sync icu4j's CjkBreakEngine to icu4c's"
This reverts commit 08c3f99c08
.
This commit is contained in:
parent
08c3f99c08
commit
2708c38d8e
3 changed files with 2 additions and 17 deletions
icu4c/source
icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi
|
@ -1361,7 +1361,6 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
|
|||
// while reversing t_boundary and pushing values to foundBreaks.
|
||||
int32_t prevCPPos = -1;
|
||||
int32_t prevUTextPos = -1;
|
||||
int correctedNumBreaks = 0;
|
||||
for (int32_t i = numBreaks-1; i >= 0; i--) {
|
||||
int32_t cpPos = t_boundary.elementAti(i);
|
||||
U_ASSERT(cpPos > prevCPPos);
|
||||
|
@ -1370,10 +1369,7 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
|
|||
if (utextPos > prevUTextPos) {
|
||||
// Boundaries are added to foundBreaks output in ascending order.
|
||||
U_ASSERT(foundBreaks.size() == 0 || foundBreaks.peeki() < utextPos);
|
||||
if (!(foundBreaks.contains(utextPos) || utextPos == rangeStart)) {
|
||||
foundBreaks.push(utextPos, status);
|
||||
correctedNumBreaks++;
|
||||
}
|
||||
foundBreaks.push(utextPos, status);
|
||||
} else {
|
||||
// Normalization expanded the input text, the dictionary found a boundary
|
||||
// within the expansion, giving two boundaries with the same index in the
|
||||
|
@ -1385,14 +1381,9 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
|
|||
}
|
||||
(void)prevCPPos; // suppress compiler warnings about unused variable
|
||||
|
||||
if (!foundBreaks.isEmpty() && foundBreaks.peeki() == rangeEnd) {
|
||||
foundBreaks.popi();
|
||||
correctedNumBreaks--;
|
||||
}
|
||||
|
||||
// inString goes out of scope
|
||||
// inputMap goes out of scope
|
||||
return correctedNumBreaks;
|
||||
return numBreaks;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
3
icu4c/source/test/testdata/rbbitst.txt
vendored
3
icu4c/source/test/testdata/rbbitst.txt
vendored
|
@ -796,9 +796,6 @@
|
|||
<word>
|
||||
<data>•ジョージア<400> •</data>
|
||||
|
||||
<word>
|
||||
<data>•[<0>携帯<400>電話<400>]<0>お金<400>が<400>かかる<400>ん<400>です<400>。<0></data>
|
||||
|
||||
# Test for #11723
|
||||
<word>
|
||||
<data>•アレルギー性<400>結膜炎<400></data>
|
||||
|
|
|
@ -796,9 +796,6 @@
|
|||
<word>
|
||||
<data>•ジョージア<400> •</data>
|
||||
|
||||
<word>
|
||||
<data>•[<0>携帯<400>電話<400>]<0>お金<400>が<400>かかる<400>ん<400>です<400>。<0></data>
|
||||
|
||||
# Test for #11723
|
||||
<word>
|
||||
<data>•アレルギー性<400>結膜炎<400></data>
|
||||
|
|
Loading…
Add table
Reference in a new issue