Commit 3dd0a370 by Kenton Lee

Add reference for python implementation of coreference metrics.

parent 44d5a26a
......@@ -2,6 +2,9 @@ import numpy as np
from collections import Counter
from sklearn.utils.linear_assignment_ import linear_assignment
"""
Mostly borrowed from https://github.com/clarkkev/deep-coref/blob/master/evaluation.py
"""
def f1(p_num, p_den, r_num, r_den, beta=1):
p = 0 if p_den == 0 else p_num / float(p_den)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment