1

Hi I am new bee in python and we are trying to find the country ,cities name from geotext library of python but it is not picking every name correctly. could anyone please suggest what should be wrong.

While reading the data from email it is picking up "Mobile" as city which is in SIgnature of email

from geotext import GeoText
places = GeoText("Hi , We need to book a flight from Mumbai to London on 13 Aug throuigh shivaji terminal.
Regards,
xyz
Mobile : 5368536
")

Output : ['Mumbai' ,'Moble']

please help

Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186
sharma
  • 23
  • 3

1 Answers1

1

There are three cities named 'Mobile' in various states the US. You cannot avoid picking it up (unless you decide to block that specific word as being a city - but there could easily be other cities with names that match common words).

Leo K
  • 5,189
  • 3
  • 12
  • 27