Spaces:
Runtime error
Runtime error
Commit
·
dc58345
1
Parent(s):
ccb5e74
Update countriesIdentification.py
Browse files
countriesIdentification.py
CHANGED
@@ -632,6 +632,7 @@ def identify_locations(sentence):
|
|
632 |
|
633 |
# if a city exists
|
634 |
if 'city' in locations_dict:
|
|
|
635 |
resolved_dict = helper_resolve_cities(sentence, locations_dict)
|
636 |
|
637 |
# we accept one country and one city
|
@@ -655,6 +656,7 @@ def identify_locations(sentence):
|
|
655 |
elif len(resolved_dict['country']) == 1 and len(resolved_dict['city']) == 0:
|
656 |
|
657 |
resolved_dict['country'][0] = resolved_dict['country'][0].capitalize()
|
|
|
658 |
|
659 |
# there were some cases that the 'x$x' was not removed
|
660 |
for key, values in resolved_dict.items():
|
|
|
632 |
|
633 |
# if a city exists
|
634 |
if 'city' in locations_dict:
|
635 |
+
|
636 |
resolved_dict = helper_resolve_cities(sentence, locations_dict)
|
637 |
|
638 |
# we accept one country and one city
|
|
|
656 |
elif len(resolved_dict['country']) == 1 and len(resolved_dict['city']) == 0:
|
657 |
|
658 |
resolved_dict['country'][0] = resolved_dict['country'][0].capitalize()
|
659 |
+
resolved_dict['city'] = ['0']
|
660 |
|
661 |
# there were some cases that the 'x$x' was not removed
|
662 |
for key, values in resolved_dict.items():
|