VyLala commited on
Commit
d81c120
·
verified ·
1 Parent(s): 169191e

Update confidence_score.py

Browse files
Files changed (1) hide show
  1. confidence_score.py +6 -7
confidence_score.py CHANGED
@@ -133,13 +133,12 @@ def compute_confidence_score_and_tier(
133
 
134
  # ---------- Signal 2: Cross-source consistency ----------
135
  print("standardize pre_country")
136
- pred_country = standardize_location.smart_country_lookup(signals.get("predicted_country").lower())
137
- print("pred country after standardizing: ", pred_country)
138
- if pred_country == "not found":
139
- pred_country = normalize_country(signals.get("predicted_country"))
140
- gb_country = standardize_location.smart_country_lookup(signals.get("genbank_country").lower())
141
- if gb_country == "not found":
142
- gb_country = normalize_country(signals.get("genbank_country"))
143
  print("both pred_country and gb_country after standardizing: ", pred_country, gb_country)
144
  cons_cfg = rules["consistency"]
145
  print("start compare gb country and pre country")
 
133
 
134
  # ---------- Signal 2: Cross-source consistency ----------
135
  print("standardize pre_country")
136
+ pred_country = signals.get("predicted_country")
137
+ if pred_country:
138
+ pred_country = standardize_location.smart_country_lookup(signals.get("predicted_country").lower())
139
+ gb_country = signals.get("genbank_country")
140
+ if gb_country:
141
+ gb_country = standardize_location.smart_country_lookup(signals.get("genbank_country").lower())
 
142
  print("both pred_country and gb_country after standardizing: ", pred_country, gb_country)
143
  cons_cfg = rules["consistency"]
144
  print("start compare gb country and pre country")