Name: rlT66838 Date: 02/26/2000
Classic VM (build JDK-1.2.2-001, native threads , symcjit)
BreakIterator when looking for words using local FRANCE, treats hyphenated
French constructs as one one, and does not break on appostrophes.
For example "donnez-lui" and "l'homme" are each treated as one word, whereas
donnez, lui, l, and homme are all separate words in French.
For example:
Vector startV = new Vector(1);
Vector wordsV = new Vector(1);
String content = "donnez-lui, l'homme";
BreakIterator boundary = BreakIterator.getWordInstance(Locale.FRANCE);
boundary.setText(content);
int startB = boundary.first();
for (int endB = boundary.next();
endB != boundary.DONE;
startB = endB,
endB = boundary.next()) {
System.out.println(content.substring(startB, endB));
}
This will print:
donnez-lui
,
l'homme
(Review ID: 101774)
======================================================================
###@###.### 11/2/04 18:26 GMT
Classic VM (build JDK-1.2.2-001, native threads , symcjit)
BreakIterator when looking for words using local FRANCE, treats hyphenated
French constructs as one one, and does not break on appostrophes.
For example "donnez-lui" and "l'homme" are each treated as one word, whereas
donnez, lui, l, and homme are all separate words in French.
For example:
Vector startV = new Vector(1);
Vector wordsV = new Vector(1);
String content = "donnez-lui, l'homme";
BreakIterator boundary = BreakIterator.getWordInstance(Locale.FRANCE);
boundary.setText(content);
int startB = boundary.first();
for (int endB = boundary.next();
endB != boundary.DONE;
startB = endB,
endB = boundary.next()) {
System.out.println(content.substring(startB, endB));
}
This will print:
donnez-lui
,
l'homme
(Review ID: 101774)
======================================================================
###@###.### 11/2/04 18:26 GMT