public void run(String goldFile, String autoFile, int goldIndex, int autoIndex, boolean bPred)
{
BufferedReader fGold = UTInput.createBufferedFileReader(goldFile);
BufferedReader fAuto = UTInput.createBufferedFileReader(autoFile);
DEPFeat gFeats, aFeats;
int[] counts = {0,0,0}; // correct, gold total, auto total
String[] gold, auto;
String gPred, aPred;
String line;
try
{
while ((line = fGold.readLine()) != null)
{
gold = line.split(AbstractColumnReader.DELIM_COLUMN);
auto = fAuto.readLine().split(AbstractColumnReader.DELIM_COLUMN);
line = line.trim();
if (line.isEmpty()) continue;
gFeats = new DEPFeat(gold[goldIndex]);
aFeats = new DEPFeat(auto[autoIndex]);
if (bPred)
{
if ((gPred = gFeats.get(DEPLib.FEAT_PB)) != null)
counts[1]++;
if ((aPred = aFeats.get(DEPLib.FEAT_PB)) != null)
counts[2]++;
if (gPred != null && aPred != null)
counts[0]++;
}
else
{
if ((gPred = gFeats.get(DEPLib.FEAT_PB)) != null)
{
aPred = aFeats.get(DEPLib.FEAT_PB);
counts[1]++;
counts[2]++;