Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parsing problems #104

Open
Simpey opened this issue Nov 29, 2021 · 0 comments
Open

parsing problems #104

Simpey opened this issue Nov 29, 2021 · 0 comments

Comments

@Simpey
Copy link

Simpey commented Nov 29, 2021

geo.geoparse("Long Beach, CA To: Fresno, CA FTL non-hazmat") returns

[{'word': 'Long Beach',
  'spans': [{'start': 0, 'end': 10}],
  'country_predicted': 'AUS',
  'country_conf': 0.9048774,
  'geo': {'admin1': 'New South Wales',
   'lat': '-35.70833',
   'lon': '150.24483',
   'country_code3': 'AUS',
   'geonameid': '8219798',
   'place_name': 'Long Beach',
   'feature_class': 'P',
   'feature_code': 'PPL'}}]

So lib ignores Fresno, CA . But if I change the string to Long Beach, CA To: Fresno, CA it will parse Fresno, CA as it should be

[{'word': 'Long Beach',
  'spans': [{'start': 0, 'end': 10}],
  'country_predicted': 'AUS',
  'country_conf': 0.9048774,
  'geo': {'admin1': 'New South Wales',
   'lat': '-35.70833',
   'lon': '150.24483',
   'country_code3': 'AUS',
   'geonameid': '8219798',
   'place_name': 'Long Beach',
   'feature_class': 'P',
   'feature_code': 'PPL'}},
 {'word': 'Fresno',
  'spans': [{'start': 19, 'end': 25}],
  'country_predicted': 'USA',
  'country_conf': 0.96374094,
  'geo': {'admin1': 'California',
   'lat': '36.75818',
   'lon': '-119.64932',
   'country_code3': 'USA',
   'geonameid': '5350964',
   'place_name': 'Fresno County',
   'feature_class': 'A',
   'feature_code': 'ADM2'}}]

Also it parses Long Beach, CA as Long Beach, Australia despite CA state is present in string and it should be USA, not Australia. Could anyone help me with this one pls?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant