Skip to content

Commit

Permalink
Completed SemSearch ground truth.
Browse files Browse the repository at this point in the history
  • Loading branch information
eamsen committed Dec 24, 2013
1 parent 23f54f3 commit 739e905
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 7 additions & 3 deletions ground-truth/entities-0
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ arab-states-of-the-persian-gulf Oman
arab-states-of-the-persian-gulf Qatar
arab-states-of-the-persian-gulf Saudi_Arabia
arab-states-of-the-persian-gulf United_Arab_Emirates
arab-states-of-the-persian-gulf Iran
arab-states-of-the-persian-gulf Iraq

astronauts-who-landed-on-the-moon Neil_Armstrong
astronauts-who-landed-on-the-moon Buzz_Aldrin
Expand Down Expand Up @@ -94,7 +96,6 @@ dioceses-of-the-church-of-ireland Roman_Catholic_Diocese_of_Elphi
dioceses-of-the-church-of-ireland Saint_Francis_National_School
dioceses-of-the-church-of-ireland Roman_Catholic_Diocese_of_Killala

first-targets-of-the-atomic-bomb Kokura
first-targets-of-the-atomic-bomb Hiroshima
first-targets-of-the-atomic-bomb Nagasaki

Expand Down Expand Up @@ -239,7 +240,7 @@ orders-or-choirs-of-angels Sons_of_God
permanent-members-of-the-un-security-council France
permanent-members-of-the-un-security-council United_Kingdom
permanent-members-of-the-un-security-council United_States
permanent-members-of-the-un-security-council People's_Republic_of_China
permanent-members-of-the-un-security-council China
permanent-members-of-the-un-security-council Russian_Federation

presidents-depicted-on-mount-rushmore-who-died-of-shooting Abraham_Lincoln
Expand Down Expand Up @@ -315,7 +316,7 @@ ten-ancient-greek-city-kingdoms-of-cyprus Kyrenia
first-13-american-states Delaware
first-13-american-states Pennsylvania
first-13-american-states New_Jersey
first-13-american-states Georgia_(U.S._state)
first-13-american-states Georgia
first-13-american-states Connecticut
first-13-american-states Massachusetts
first-13-american-states Maryland
Expand Down Expand Up @@ -418,6 +419,9 @@ where-the-british-monarch-is-also-head-of-state United_Kingdom
founder-of-stumbleupon Garrett_Camp

jacki-weaver's-spouses Derryn_Hinch
jacki-weaver's-spouses Sean_Taylor
jacki-weaver's-spouses David_Price
jacki-weaver's-spouses Max_Hensser

inventor-of-the-python-programming-language Guido_van_Rossum

Expand Down
5 changes: 3 additions & 2 deletions tools/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ def parse_log(path):
queries.append(parse_query(r.split(",")))
return queries;

def f_score(recall, prec):
return 2.0 * recall * prec / max(0.001, recall + prec)
def f_score(recall, prec, a=1.0):
a *= a
return (a + 1.0) * recall * prec / max(0.001, a * prec + recall)

def find_max_precision(query):
num_answers = query.num_answers
Expand Down

0 comments on commit 739e905

Please sign in to comment.