Commit 0e794f16 authored by Vít Novotný's avatar Vít Novotný
Browse files

Create scripts.common.get_judged_documents

parent 1ee130ec
Pipeline #57594 failed with stage
in 41 seconds
from .common import ndcg
from .common import get_judged_documents, ndcg
......@@ -21,6 +21,14 @@ def remove_nonjudged_topics_and_documents(parsed_run, task, subset):
return only_judged_parsed_run
def get_judged_documents(task='task1'):
judged_documents = set()
for subset in PARSED_RELEVANCE_JUDGEMENTS.values():
for documents in subset[task].values():
judged_documents.update(documents)
return judged_documents
def ndcg(parsed_run, task='task1', subset='train'):
evaluator = EVALUATORS[subset][task]
only_judged_parsed_run = remove_nonjudged_topics_and_documents(parsed_run, task, subset)
......
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