kindred.evaluate

kindred.evaluate(goldCorpus, testCorpus, metric='f1score', display=False)[source]

Compares the gold corpus with the test corpus and calculate appropriate metrics.

Parameters:
  • goldCorpus (kindred.Corpus) – The gold standard set of data
  • testCorpus (kindred.Corpus) – The test set for comparison
  • metric (str) – Which metric to use (precision/recall/f1score). ‘all’ will provide all three as a tuple
  • display (bool) – Whether to print (to stdout) specific statistics for each relation type
Returns:

The value of the corresponding metric (or metrics)

Return type:

float (or tuple of floats)