BaseToken bta = (BaseToken) btaItr.next();
String normForm = null;
if (!(bta instanceof WordToken)) {
normForm = bta.getCoveredText();
} else {
WordToken wta = (WordToken) bta;
String canonicalForm = wta.getCanonicalForm();
// The norm form is the canonical form, if there is one
// Otherwise the norm form is the token's text.
if ((canonicalForm != null) && (canonicalForm.length() > 0)) {
normForm = canonicalForm;
} else {
normForm = wta.getCoveredText();
}
}
bta.setNormalizedForm(normForm);
}
}