while (j > i) {
StringBuffer candSB = new StringBuffer();
for (int k = i; k <= j; k++) {
Token currtok = (Token) inputtoks.get(k);
candSB.append(" ");
candSB.append(currtok.getText());
}
String cand = candSB.toString().trim();
// Attempt to look up the candidate in the hyphen map
if (iv_shouldbeHyphenMap.containsKey(cand.toLowerCase())) {
// set the initial offsets
orig_startOffset = ((Token) inputtoks.get(i)).getStartOffset();
orig_endOffset = ((Token) inputtoks.get(j)).getEndOffset();
new_startOffset = orig_startOffset;
new_endOffset = orig_endOffset;
// compile new text
String newText = "";
for (int k = i; k <= j; k++) {
Token currtok = (Token) inputtoks.get(k);
newText += currtok.getText() + "-";
}
newText = newText.substring(0, newText.length() - 1);
// Get the new and old lengths of hyphenated spans
int new_Length = newText.length();