Skip to content

Commit

Permalink
Merge pull request #350 from hellohaptik/city_syntax_error_fix
Browse files Browse the repository at this point in the history
Add u prefix to fix syntax error
  • Loading branch information
chiragjn authored Mar 3, 2020
2 parents ea0f3ff + 01b415b commit de9919b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ner_v1/detectors/textual/city/city_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def _detect_departure_arrival_city(self):
"""
city_dict_list = []
patterns = re.findall(u'\\s(([A-Za-z\u0900-\u097F]+)\\s'
'+(\\-|to|2|se|से|and)\\s+([A-Za-z\u0900-\u097F\\s]+))\\.?',
u'+(\\-|to|2|se|से|and)\\s+([A-Za-z\u0900-\u097F\\s]+))\\.?',
self.processed_text.lower(), re.UNICODE)
for pattern in patterns:
city_dict_list.extend(
Expand Down Expand Up @@ -234,7 +234,7 @@ def _detect_departure_city(self):
"""
city_dict_list = []
patterns = re.findall(u'\\s((from|frm|departing|depart|leaving|leave|origin '
'city\\:|departure city\\:|going to)'
u'city\\:|departure city\\:|going to)'
u'\\s+([A-Za-z\u0900-\u097F]+))\\.?\\s',
self.processed_text.lower(), re.UNICODE)

Expand Down

0 comments on commit de9919b

Please sign in to comment.