• Home
  • Raw
  • Download

Lines Matching full:spaces

25  * spaces inserted where the word breaks are. It computes a copy of
26 * the text without spaces and uses a word instance of a Thai BreakIterator
35 * This class is a break iterator that counts words and spaces.
90 // spaces - pointer to a UChar array for the text with spaces
91 // spaceCount - the number of characters in the spaces array
92 // noSpaces - pointer to a UChar array for the text without spaces
95 …ThaiWordbreakTest(const UChar *spaces, int32_t spaceCount, const UChar *noSpaces, int32_t noSpaceC…
98 // returns the number of breaks that are in the spaces array
103 // array but aren't in the spaces array
106 // returns the number of words found in the spaces array
115 // removes spaces form the input UChar array:
116 // spaces - pointer to the input UChar array
117 // count - number of UChars in the spaces array
119 // returns - the address of the UChar array with spaces removed
120 static const UChar *crunchSpaces(const UChar *spaces, int32_t count, int32_t &nonSpaceCount);
127 // spaces - the address of the UChar array for the text with spaces
128 // spaceCount - the number of UChars in the spaces array
129 // noSpaces - the address of the UChar array for the text without spaces
132 UBool compareWordBreaks(const UChar *spaces, int32_t spaceCount,
135 // helper method to report a break in the spaces
140 // the noSpaces array that's not in the spaces array
143 // count of breaks in the spaces array that
148 // that aren't in the spaces array
151 // number of words found in the spaces array
161 ThaiWordbreakTest::ThaiWordbreakTest(const UChar *spaces, int32_t spaceCount, in ThaiWordbreakTest() argument
165 compareWordBreaks(spaces, spaceCount, noSpaces, noSpaceCount); in ThaiWordbreakTest()
185 * returns the number of breaks in the spaces array
195 * array that aren't in the spaces array
203 * Returns the number of words found in the spaces array
212 * It uses a SpaceBreakIterator to iterate over the text with spaces,
214 * without spaces.
216 UBool ThaiWordbreakTest::compareWordBreaks(const UChar *spaces, int32_t spaceCount, in compareWordBreaks() argument
227 SpaceBreakIterator spaceIter(spaces, spaceCount); in compareWordBreaks()
274 * Report a break that's in the text with spaces but
275 * not found in the text without spaces.
289 * Report a break that's found in the text without spaces
290 * that isn't in the text with spaces.
362 * Remove spaces from the input UChar array.
368 const UChar *ThaiWordbreakTest::crunchSpaces(const UChar *spaces, int32_t count, int32_t &nonSpaceC… in crunchSpaces() argument
374 if (spaces[i] == 0x0020 /*Unicode::isSpaceChar(spaces[i])*/) { in crunchSpaces()
388 if (spaces[i] != 0x0020 /*! Unicode::isSpaceChar(spaces[i])*/) { in crunchSpaces()
389 noSpaces[out++] = spaces[i]; in crunchSpaces()
397 * Generate a text file with spaces in it from a file without.
438 * remove the spaces, do the comparison and report the final results
467 const UChar *spaces, *noSpaces; in main() local
469 spaces = ThaiWordbreakTest::readFile(fileName, spaceCount); in main()
471 if (spaces == 0) { in main()
476 return generateFile(spaces, spaceCount); in main()
479 noSpaces = ThaiWordbreakTest::crunchSpaces(spaces, spaceCount, nonSpaceCount); in main()
485 ThaiWordbreakTest test(spaces, spaceCount, noSpaces, nonSpaceCount, verbose); in main()
524 * Return the next break, counting words and spaces.