VyLala commited on
Commit
b224438
·
verified ·
1 Parent(s): 3050abe

Update standardize_location.py

Browse files
Files changed (1) hide show
  1. standardize_location.py +4 -0
standardize_location.py CHANGED
@@ -59,17 +59,21 @@ def smart_country_lookup(user_input):
59
  if len(normalized) <= 3:
60
  if normalized.upper() in ["UK","U.K","U.K."]:
61
  country = get_country_from_geonames(normalized.upper())
 
62
  if country:
63
  return country
64
  else:
65
  country = get_country_from_countryinfo(raw_input)
 
66
  if country:
67
  return country
68
  country = get_country_from_countryinfo(raw_input) # try full names
 
69
  if country:
70
  return country
71
  # Otherwise, treat as city/place
72
  country = get_country_from_geonames(raw_input)
 
73
  if country:
74
  return country
75
 
 
59
  if len(normalized) <= 3:
60
  if normalized.upper() in ["UK","U.K","U.K."]:
61
  country = get_country_from_geonames(normalized.upper())
62
+ print("get_country_from_geonames(normalized.upper()) ", country)
63
  if country:
64
  return country
65
  else:
66
  country = get_country_from_countryinfo(raw_input)
67
+ print("get_country_from_countryinfo(raw_input) ", country)
68
  if country:
69
  return country
70
  country = get_country_from_countryinfo(raw_input) # try full names
71
+ print("get_country_from_countryinfo(raw_input) ", country)
72
  if country:
73
  return country
74
  # Otherwise, treat as city/place
75
  country = get_country_from_geonames(raw_input)
76
+ print("get_country_from_geonames(raw_input) ", country)
77
  if country:
78
  return country
79