Skip to content

Commit

Permalink
Simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
thobson88 committed Dec 18, 2024
1 parent 0ff4746 commit 58b39c3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions t_res/geoparser/linking.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,8 @@ def disambiguation_scores(self, wikidata_links: List[ByDistanceLink], string_sim
distance_score = 1.0 - (distance / max_on_gb)

relv_score = min(1.0, (string_similarity + link.normalized_score) / 2.0)
final_score = round((relv_score + distance_score) / 2, 3) if link.geodist is not None else 0.0

final_score = 0.0
if link.geodist is not None:
final_score = round((relv_score + distance_score) / 2, 3)
ret[link.wqid] = final_score
return ret

Expand Down

0 comments on commit 58b39c3

Please sign in to comment.