• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/ICU-511.35/icuSources/test/thaitest/

Lines Matching defs:spaces

23  * spaces inserted where the word breaks are. It computes a copy of
24 * the text without spaces and uses a word instance of a Thai BreakIterator
33 * This class is a break iterator that counts words and spaces.
88 // spaces - pointer to a UChar array for the text with spaces
89 // spaceCount - the number of characters in the spaces array
90 // noSpaces - pointer to a UChar array for the text without spaces
93 ThaiWordbreakTest(const UChar *spaces, int32_t spaceCount, const UChar *noSpaces, int32_t noSpaceCount, UBool verbose);
96 // returns the number of breaks that are in the spaces array
101 // array but aren't in the spaces array
104 // returns the number of words found in the spaces array
113 // removes spaces form the input UChar array:
114 // spaces - pointer to the input UChar array
115 // count - number of UChars in the spaces array
117 // returns - the address of the UChar array with spaces removed
118 static const UChar *crunchSpaces(const UChar *spaces, int32_t count, int32_t &nonSpaceCount);
125 // spaces - the address of the UChar array for the text with spaces
126 // spaceCount - the number of UChars in the spaces array
127 // noSpaces - the address of the UChar array for the text without spaces
130 UBool compareWordBreaks(const UChar *spaces, int32_t spaceCount,
133 // helper method to report a break in the spaces
138 // the noSpaces array that's not in the spaces array
141 // count of breaks in the spaces array that
146 // that aren't in the spaces array
149 // number of words found in the spaces array
159 ThaiWordbreakTest::ThaiWordbreakTest(const UChar *spaces, int32_t spaceCount,
163 compareWordBreaks(spaces, spaceCount, noSpaces, noSpaceCount);
183 * returns the number of breaks in the spaces array
193 * array that aren't in the spaces array
201 * Returns the number of words found in the spaces array
210 * It uses a SpaceBreakIterator to iterate over the text with spaces,
212 * without spaces.
214 UBool ThaiWordbreakTest::compareWordBreaks(const UChar *spaces, int32_t spaceCount,
225 SpaceBreakIterator spaceIter(spaces, spaceCount);
272 * Report a break that's in the text with spaces but
273 * not found in the text without spaces.
287 * Report a break that's found in the text without spaces
288 * that isn't in the text with spaces.
360 * Remove spaces from the input UChar array.
366 const UChar *ThaiWordbreakTest::crunchSpaces(const UChar *spaces, int32_t count, int32_t &nonSpaceCount)
372 if (spaces[i] == 0x0020 /*Unicode::isSpaceChar(spaces[i])*/) {
386 if (spaces[i] != 0x0020 /*! Unicode::isSpaceChar(spaces[i])*/) {
387 noSpaces[out++] = spaces[i];
395 * Generate a text file with spaces in it from a file without.
436 * remove the spaces, do the comparison and report the final results
465 const UChar *spaces, *noSpaces;
467 spaces = ThaiWordbreakTest::readFile(fileName, spaceCount);
469 if (spaces == 0) {
474 return generateFile(spaces, spaceCount);
477 noSpaces = ThaiWordbreakTest::crunchSpaces(spaces, spaceCount, nonSpaceCount);
483 ThaiWordbreakTest test(spaces, spaceCount, noSpaces, nonSpaceCount, verbose);
522 * Return the next break, counting words and spaces.