Created
July 26, 2015 22:24
-
-
Save mickeypash/e18e178da80ed2db6d6e to your computer and use it in GitHub Desktop.
My solution is in the comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getQueryResultPerformance(results, topic_num): | |
i = 0 | |
rels_found = 0 | |
for r in results: | |
i += 1 | |
if qrels.get_value(topic_num, r.docid) > 0: | |
rels_found += 1 | |
# rels_found = sum(qrels.get_value(topic_num, r.docid) > 0 for r in results) | |
# return [rels_found, len(results)] | |
return [rels_found, i] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment