Commit cf970f7f authored by Percedal's avatar Percedal
Browse files

clean eval.py

parent d9128d02
......@@ -21,9 +21,10 @@ def count(annot):
count_dict = {}
for d in annot:
_,_,_,acr = d.values()
for d2 in acr:
tid,tk,_,_,deflem,_,pred = d2.values()
for d2 in d["acronymes"]:
tk = d2["token"]
deflem = d2["def_lem"]
pred = d2["prediction"]
if not tk in count_dict:
count_dict[tk] = {
"count":[0,0],
......@@ -33,7 +34,7 @@ def count(annot):
count_dict[tk]["count"][1] += 1
if pred == "...":
print(f"--> Prédiction manquante pour id token {tid} ({tk})")
print(f"--> Prédiction manquante pour id token {d2['id']} ({tk})")
elif pred == deflem:
count_dict[tk]["count"][0] += 1
......
Supports Markdown
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