| OLD | NEW |
| 1 /** | 1 /** |
| 2 ******************************************************************************* | 2 ******************************************************************************* |
| 3 * Copyright (C) 2006-2013, International Business Machines Corporation | 3 * Copyright (C) 2006-2013, International Business Machines Corporation |
| 4 * and others. All Rights Reserved. | 4 * and others. All Rights Reserved. |
| 5 ******************************************************************************* | 5 ******************************************************************************* |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "unicode/utypes.h" | 8 #include "unicode/utypes.h" |
| 9 | 9 |
| 10 #if !UCONFIG_NO_BREAK_ITERATION | 10 #if !UCONFIG_NO_BREAK_ITERATION |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 | 614 |
| 615 /* | 615 /* |
| 616 ****************************************************************** | 616 ****************************************************************** |
| 617 * KhmerBreakEngine | 617 * KhmerBreakEngine |
| 618 */ | 618 */ |
| 619 | 619 |
| 620 // How many words in a row are "good enough"? | 620 // How many words in a row are "good enough"? |
| 621 #define KHMER_LOOKAHEAD 3 | 621 #define KHMER_LOOKAHEAD 3 |
| 622 | 622 |
| 623 // Will not combine a non-word with a preceding dictionary word longer than this | 623 // Will not combine a non-word with a preceding dictionary word longer than this |
| 624 #define KHMER_ROOT_COMBINE_THRESHOLD 3 | 624 #define KHMER_ROOT_COMBINE_THRESHOLD 10 |
| 625 | 625 |
| 626 // Will not combine a non-word that shares at least this much prefix with a | 626 // Will not combine a non-word that shares at least this much prefix with a |
| 627 // dictionary word, with a preceding word | 627 // dictionary word, with a preceding word |
| 628 #define KHMER_PREFIX_COMBINE_THRESHOLD 3 | 628 #define KHMER_PREFIX_COMBINE_THRESHOLD 5 |
| 629 | 629 |
| 630 // Minimum word size | 630 // Minimum word size |
| 631 #define KHMER_MIN_WORD 2 | 631 #define KHMER_MIN_WORD 2 |
| 632 | 632 |
| 633 // Minimum number of characters for two words | 633 // Minimum number of characters for two words |
| 634 #define KHMER_MIN_WORD_SPAN (KHMER_MIN_WORD * 2) | 634 #define KHMER_MIN_WORD_SPAN (KHMER_MIN_WORD * 2) |
| 635 | 635 |
| 636 KhmerBreakEngine::KhmerBreakEngine(DictionaryMatcher *adoptDictionary, UErrorCod
e &status) | 636 KhmerBreakEngine::KhmerBreakEngine(DictionaryMatcher *adoptDictionary, UErrorCod
e &status) |
| 637 : DictionaryBreakEngine((1 << UBRK_WORD) | (1 << UBRK_LINE)), | 637 : DictionaryBreakEngine((1 << UBRK_WORD) | (1 << UBRK_LINE)), |
| 638 fDictionary(adoptDictionary) | 638 fDictionary(adoptDictionary) |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1136 | 1136 |
| 1137 utext_close(&normalizedText); | 1137 utext_close(&normalizedText); |
| 1138 return numBreaks; | 1138 return numBreaks; |
| 1139 } | 1139 } |
| 1140 #endif | 1140 #endif |
| 1141 | 1141 |
| 1142 U_NAMESPACE_END | 1142 U_NAMESPACE_END |
| 1143 | 1143 |
| 1144 #endif /* #if !UCONFIG_NO_BREAK_ITERATION */ | 1144 #endif /* #if !UCONFIG_NO_BREAK_ITERATION */ |
| 1145 | 1145 |
| OLD | NEW |