mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-20 20:19:32 +00:00
ICU-4269 Tweak sentence break rules; fix rbbi UText problem.
X-SVN-Rev: 18591
This commit is contained in:
parent
6286b7d531
commit
f4c3b75a4d
3 changed files with 15 additions and 5 deletions
|
@ -1467,6 +1467,7 @@ public:
|
|||
virtual UChar32 current32(void) const;
|
||||
virtual UBool hasPrevious();
|
||||
virtual int32_t move(int32_t delta, EOrigin origin);
|
||||
virtual int32_t move32(int32_t, EOrigin);
|
||||
static UClassID getStaticClassID(void);
|
||||
virtual UClassID getDynamicClassID(void) const;
|
||||
|
||||
|
@ -1490,7 +1491,6 @@ private:
|
|||
virtual UChar current(void) const {U_ASSERT(FALSE); return 0;};
|
||||
virtual UChar next(void) {U_ASSERT(FALSE); return 0;};
|
||||
virtual UChar previous(void) {U_ASSERT(FALSE); return 0;};
|
||||
virtual int32_t move32(int32_t, EOrigin) {U_ASSERT(FALSE); return 0;};
|
||||
virtual void getText(UnicodeString &) {U_ASSERT(FALSE);};
|
||||
};
|
||||
|
||||
|
@ -1635,6 +1635,18 @@ default:
|
|||
return result;
|
||||
}
|
||||
|
||||
int32_t CharacterIteratorUT::move32(int32_t amt, EOrigin origin) {
|
||||
switch (origin) {
|
||||
case kCurrent:
|
||||
utext_moveIndex32(fUText, amt);
|
||||
break;
|
||||
default:
|
||||
// don't bother with kStart, kEnd. Not Used by break iteration.
|
||||
U_ASSERT(FALSE);
|
||||
}
|
||||
pos = utext_getNativeIndex(fUText);
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
||||
void CharacterIteratorUT::resetTo(const UText *ut, UErrorCode *status) {
|
||||
|
@ -1677,7 +1689,6 @@ UText *RuleBasedBreakIterator::getUText(UText *fillIn, UErrorCode &status) const
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
|
||||
|
|
|
@ -100,6 +100,6 @@ $CloseEx_R = $Format* $Extend* $Close;
|
|||
# may require improving support for look-ahead breaks in the
|
||||
# builder. Needs more investigation.
|
||||
#
|
||||
[{bof}] [^$Sep]* ($Sep | $LF $CR) [^$Sep]* [$Sep {eof}];
|
||||
[{bof}] [^$Sep]* ($Sep | $LF $CR) [^$Sep]* [$Sep {eof}] ($SpEx_R* $CloseEx_R* ($STermEx_R | $ATermEx_R))?;
|
||||
|
||||
|
||||
|
|
|
@ -3617,8 +3617,7 @@ void RBBITest::TestMonkey(char *params) {
|
|||
RunMonkey(bi, m, "char", seed, loopCount, useUText);
|
||||
if (breakType == "all" && useUText==FALSE) {
|
||||
// Also run a quick test with UText when "all" is specified
|
||||
// TODO: re-enable this test
|
||||
// RunMonkey(bi, m, "char", seed, loopCount, TRUE);
|
||||
RunMonkey(bi, m, "char", seed, loopCount, TRUE);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Reference in a new issue