// parse it
System.out.println(line);
parser.parse(line);
int numParses = Math.min(nbestListSize, parser.getResult().size());
for (int i=0; i < numParses; i++) {
Sign thisParse = parser.getResult().get(i);
// convert lf
Category cat = thisParse.getCategory();
LF convertedLF = null;
String predInfo = null;
if (cat.getLF() != null) {
// convert LF
LF flatLF = cat.getLF();
cat = cat.copy();
Nominal index = cat.getIndexNominal();
convertedLF = HyloHelper.compactAndConvertNominals(flatLF, index, thisParse);
// get pred info
predInfoMap.clear();
Testbed.extractPredInfo(flatLF, predInfoMap);
predInfo = Testbed.getPredInfo(predInfoMap);
}
// add test item, sign
Element item = RegressionInfo.makeTestItem(grammar, line, 1, convertedLF);
String actualID = (nbestListSize == 1) ? id : id + "-" + (i+1);
item.setAttribute("info", actualID);
outRoot.addContent(item);
signMap.put(actualID, thisParse);
// Add parsed words as a separate LF element
Element fullWordsElt = new Element("full-words");
fullWordsElt.addContent(tokenizer.format(thisParse.getWords()));
item.addContent(fullWordsElt);
if (predInfo != null) {
Element predInfoElt = new Element("pred-info");
predInfoElt.setAttribute("data", predInfo);
item.addContent(predInfoElt);