Skip to content
Snippets Groups Projects
Commit 586737ed authored by Franck Dary's avatar Franck Dary
Browse files

Fixed script

parent 136245ce
No related branches found
No related tags found
No related merge requests found
......@@ -372,8 +372,8 @@ def evaluate(gold_ud, system_ud, extraColumns) :
if isNumeric :
self.precision = 0
self.recall = R2
self.f1 = correct[1] / gold_total if gold_total else 0.0
self.aligned_accuracy = correct[0] / gold_total if gold_total else 0.0
self.f1 = correct[1]
self.aligned_accuracy = correct[0]
else :
self.precision = 100*correct[0] / system_total if system_total else 0.0
......@@ -457,6 +457,8 @@ def evaluate(gold_ud, system_ud, extraColumns) :
R2 = None
if isNumericOnly :
correct[0] /= len(goldValues)
correct[1] /= len(goldValues)
goldMean = sum(goldValues) / len(goldValues)
predMean = sum(predictedValues) / len(predictedValues)
numerator = 0.0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment