wikilinks / conll03_nel_eval

Python evaluation scripts for AIDA-formatted CoNLL data
Apache License 2.0
20 stars 4 forks source link

Fix test failures #29

Closed jnothman closed 10 years ago

jnothman commented 10 years ago
======================================================================
FAIL: conll03_nel_eval.test.test_attempt
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/joel/.virtualenvs/c/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/joel/repos/conll03_nel_eval/conll03_nel_eval/test.py", line 96, in test_attempt
    assert check_correct(ATTEMPT, _get_stats('data.txt', 'data_attempt.txt'))
  File "/Users/joel/repos/conll03_nel_eval/conll03_nel_eval/test.py", line 47, in check_correct
    assert expected[k] == actual[k], 'Different on key "{}".\nexpected\t{}\nactual\t{}'.format(k, expected[k], actual[k])
AssertionError: Different on key "entity_match".
expected    {'fp': 1, 'recall': 1.0, 'precision': 0.5, 'tp': 1, 'fn': 0, 'fscore': 0.6666666666666666}
actual  {'fp': 0, 'recall': 1.0, 'precision': 1.0, 'tp': 2, 'fn': 0, 'fscore': 1.0}
-------------------- >> begin captured stdout << ---------------------
{'entity_match': {'fn': 0,
                  'fp': 0,
                  'fscore': 1.0,
                  'precision': 1.0,
                  'recall': 1.0,
                  'tp': 2},
 'strong_link_match': {'fn': 0,
                       'fp': 0,
                       'fscore': 1.0,
                       'precision': 1.0,
                       'recall': 1.0,
                       'tp': 2},
 'strong_mention_match': {'fn': 0,
                          'fp': 0,
                          'fscore': 1.0,
                          'precision': 1.0,
                          'recall': 1.0,
                          'tp': 2}}

--------------------- >> end captured stdout << ----------------------

======================================================================
FAIL: conll03_nel_eval.test.test_more_attempt
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/joel/.virtualenvs/c/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/joel/repos/conll03_nel_eval/conll03_nel_eval/test.py", line 144, in test_more_attempt
    assert check_correct(CORRECT_ATTEMPT, _get_stats('data_more.txt', 'data_more_attempt.txt'))
  File "/Users/joel/repos/conll03_nel_eval/conll03_nel_eval/test.py", line 47, in check_correct
    assert expected[k] == actual[k], 'Different on key "{}".\nexpected\t{}\nactual\t{}'.format(k, expected[k], actual[k])
AssertionError: Different on key "entity_match".
expected    {'fp': 2, 'recall': 0.3333333333333333, 'precision': 0.3333333333333333, 'tp': 1, 'fn': 2, 'fscore': 0.3333333333333333}
actual  {'fp': 0, 'recall': 1.0, 'precision': 1.0, 'tp': 3, 'fn': 0, 'fscore': 1.0}
-------------------- >> begin captured stdout << ---------------------
{'entity_match': {'fn': 0,
                  'fp': 0,
                  'fscore': 1.0,
                  'precision': 1.0,
                  'recall': 1.0,
                  'tp': 3},
 'strong_link_match': {'fn': 0,
                       'fp': 0,
                       'fscore': 1.0,
                       'precision': 1.0,
                       'recall': 1.0,
                       'tp': 3},
 'strong_mention_match': {'fn': 0,
                          'fp': 0,
                          'fscore': 1.0,
                          'precision': 1.0,
                          'recall': 1.0,
                          'tp': 4}}

--------------------- >> end captured stdout << ----------------------