if (saveSource) {
if (word.equals ("-<S>-")) source.append ("\n\n");
source.append (word); source.append (" ");
}
Token token = new StringSpan (source, start, source.length () - 1);
// Word and tag unigram at current time
if (doSpelling) {
for (int j = 0; j < endings.length; j++) {
ending[2][j] = ending[1][j];
ending[1][j] = ending[0][j];
ending[0][j] = endingPatterns[j].matcher(word).matches();
if (ending[0][j]) token.setFeatureValue (endingNames[0][0][j], 1);
}
}
if (doTags) {
token.setFeatureValue ("T="+tag, 1);
}
if (doPhrases) {
token.setFeatureValue ("P="+phrase, 1);
}
data.add (token);
if (isTargetProcessing ()) {