{ "info": { "author": "Somnath Rakshit", "author_email": "somnath52@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "\ngeograpy3 is a fork of [Geograpy2](https://github.com/Corollarium/geograpy2), which is itself a fork of [geograpy](https://github.com/ushahidi/geograpy) and inherits\nmost of it, but solves several problems (such as support for utf8, places names \nwith multiple words, confusion over homonyms etc). Also, geograpy3 is compatible with Python 3, unlike Geography2.\n\ngeograpy3\n========\n\nExtract place names from a URL or text, and add context to those names -- for \nexample distinguishing between a country, region or city. \n\n## Install & Setup\n\nGrab the package using `pip` (this will take a few minutes)\n\n pip install geograpy3\n\ngeograpy3 uses [NLTK](http://www.nltk.org/) for entity recognition, so you'll also need \nto download the models we're using. Fortunately there's a command that'll take \ncare of this for you. \n\n geograpy-nltk\n\n## Basic Usage\n\nImport the module, give some text or a URL, and presto.\n\n import geograpy\n url = 'http://www.bbc.com/news/world-europe-26919928'\n places = geograpy.get_place_context(url=url)\n\nNow you have access to information about all the places mentioned in the linked \narticle. \n\n* `places.countries` _contains a list of country names_\n* `places.regions` _contains a list of region names_\n* `places.cities` _contains a list of city names_\n* `places.other` _lists everything that wasn't clearly a country, region or city_\n\nNote that the `other` list might be useful for shorter texts, to pull out \ninformation like street names, points of interest, etc, but at the moment is \na bit messy when scanning longer texts that contain possessive forms of proper \nnouns (like \"Russian\" instead of \"Russia\").\n\n## But Wait, There's More\n\nIn addition to listing the names of discovered places, you'll also get some \ninformation about the relationships between places.\n\n* `places.country_regions` _regions broken down by country_\n* `places.country_cities` _cities broken down by country_\n* `places.address_strings` _city, region, country strings useful for geocoding_\n\n## Last But Not Least\n\nWhile a text might mention many places, it's probably focused on one or two, so \ngeograpy3 also breaks down countries, regions and cities by number of mentions.\n\n* `places.country_mentions`\n* `places.region_mentions`\n* `places.city_mentions`\n\nEach of these returns a list of tuples. The first item in the tuple is the place \nname and the second item is the number of mentions. For example:\n\n [('Russian Federation', 14), (u'Ukraine', 11), (u'Lithuania', 1)] \n\n## If You're Really Serious\n\nYou can of course use each of Geograpy's modules on their own. For example:\n\n from geograpy import extraction\n\n e = extraction.Extractor(url='http://www.bbc.com/news/world-europe-26919928')\n e.find_entities()\n\n # You can now access all of the places found by the Extractor\n print(e.places)\n\nPlace context is handled in the `places` module. For example:\n\n from geograpy import places\n\n pc = places.PlaceContext(['Cleveland', 'Ohio', 'United States'])\n\n pc.set_countries()\n print pc.countries #['United States']\n\n pc.set_regions()\n print(pc.regions #['Ohio'])\n\n pc.set_cities()\n print(pc.cities #['Cleveland'])\n\n print(pc.address_strings #['Cleveland, Ohio, United States'])\n\nAnd of course all of the other information shown above (`country_regions` etc) \nis available after the corresponding `set_` method is called.\n\n\n## Credits\n\ngeograpy3 uses the following excellent libraries:\n\n* [NLTK](http://www.nltk.org/) for entity recognition\n* [newspaper](https://github.com/codelucas/newspaper) for text extraction from HTML\n* [jellyfish](https://github.com/sunlightlabs/jellyfish) for fuzzy text match\n* [pycountry](https://pypi.python.org/pypi/pycountry) for country/region lookups\n\ngeograpy3 uses the following data sources:\n\n* [GeoLite2](http://dev.maxmind.com/geoip/geoip2/geolite2/) for city lookups\n* [ISO3166ErrorDictionary](https://github.com/bodacea/countryname/blob/master/countryname/databases/ISO3166ErrorDictionary.csv) for common country mispellings _via [Sara-Jayne Terp](https://github.com/bodacea)_\n\nHat tip to [Chris Albon](https://github.com/chrisalbon) for the name.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/somnathrakshit/geograpy3", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/somnathrakshit/geograpy3", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "geograpy3", "package_url": "https://pypi.org/project/geograpy3/", "platform": "", "project_url": "https://pypi.org/project/geograpy3/", "project_urls": { "Download": "https://github.com/somnathrakshit/geograpy3", "Homepage": "https://github.com/somnathrakshit/geograpy3" }, "release_url": "https://pypi.org/project/geograpy3/0.1.2/", "requires_dist": [ "numpy", "nltk", "newspaper3k", "jellyfish", "pycountry" ], "requires_python": "", "summary": "Extract countries, regions and cities from a URL or text", "version": "0.1.2" }, "last_serial": 4296329, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d0635eef80f5ac627a7f940d2851d1ca", "sha256": "cb6d7240fe84bfd07e381d7aa5ed186e641d332eb415b104ac0d7dfd5bc815de" }, "downloads": -1, "filename": "geograpy3-0.1.0-py3.5.egg", "has_sig": false, "md5_digest": "d0635eef80f5ac627a7f940d2851d1ca", "packagetype": "bdist_egg", "python_version": "3.5", "requires_python": null, "size": 1330797, "upload_time": "2018-09-21T13:31:56", "url": "https://files.pythonhosted.org/packages/ef/32/686c813411d7f66c34403eb9e87a4ec73b32e131362f6cda4a307ab6ab20/geograpy3-0.1.0-py3.5.egg" }, { "comment_text": "", "digests": { "md5": "9955ad494529de0c2483830b7321b485", "sha256": "478d12859d770a8d9c4a139ab48f88773a0043c8caa4280aa6d90875ed17f605" }, "downloads": -1, "filename": "geograpy3-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9955ad494529de0c2483830b7321b485", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 1325438, "upload_time": "2018-09-21T13:31:50", "url": "https://files.pythonhosted.org/packages/00/ea/a390a80d2295169ffb1510486aa235d9e58f3bdacd4d9922ba7300159861/geograpy3-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "39fa5e0c27e15509f162e60098b13f5b", "sha256": "fd5e0e5f915e563b2bc7d938d8e98ec17d6ae3c01235fa2bf4a711b5a519f04b" }, "downloads": -1, "filename": "geograpy3-0.1.0.tar.gz", "has_sig": false, "md5_digest": "39fa5e0c27e15509f162e60098b13f5b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1282262, "upload_time": "2018-09-21T13:32:00", "url": "https://files.pythonhosted.org/packages/b9/6c/21950ec1077839fda09d871b32b14d0b449c7ba424f4586eeaa3185b8ddd/geograpy3-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "57dd46f9de0f662377d4dd62175d899a", "sha256": "63891fecb6caf83efa19471dba40a948948203ff091cb65b7b12d96e66fa4a8a" }, "downloads": -1, "filename": "geograpy3-0.1.1-py3.5.egg", "has_sig": false, "md5_digest": "57dd46f9de0f662377d4dd62175d899a", "packagetype": "bdist_egg", "python_version": "3.5", "requires_python": null, "size": 1330792, "upload_time": "2018-09-21T13:42:10", "url": "https://files.pythonhosted.org/packages/95/35/feb73db89c1f66dde7731625a27194ea74e1440e42e2a562fd0c9683f73c/geograpy3-0.1.1-py3.5.egg" }, { "comment_text": "", "digests": { "md5": "b0512acb2c84f592e9270aae9eaf0225", "sha256": "e645a681cbefeb952e0274a30be108ee720bcb02bf111cd577851579abf443f9" }, "downloads": -1, "filename": "geograpy3-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b0512acb2c84f592e9270aae9eaf0225", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 1325433, "upload_time": "2018-09-21T13:41:58", "url": "https://files.pythonhosted.org/packages/47/c6/5b2b0ee98f66005b00c2f19e110595ead5e512d3e3365e6a8cd7a6aa3765/geograpy3-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "45efaedfd58ffec3b1fc783c7c63ba92", "sha256": "cb6f1f180cc714233360898cca939fd458bf780d1b2786f52a2c25b548718069" }, "downloads": -1, "filename": "geograpy3-0.1.1.tar.gz", "has_sig": false, "md5_digest": "45efaedfd58ffec3b1fc783c7c63ba92", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1282261, "upload_time": "2018-09-21T13:42:14", "url": "https://files.pythonhosted.org/packages/ac/86/9bf4151764b7a060ed30013b648905864db376f24854d668f13686438861/geograpy3-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "392aad8a3d88bb441ac88af74d4901f9", "sha256": "3a5fc32b6cb3ab5ea5e7de8d2316f95f5951163403909efd8a973f50ce58b50d" }, "downloads": -1, "filename": "geograpy3-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "392aad8a3d88bb441ac88af74d4901f9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 1325436, "upload_time": "2018-09-21T13:50:12", "url": "https://files.pythonhosted.org/packages/57/3e/881a580f03ee257b61b157bc82b011d35cb3174da1b5f48dbeae38c64b87/geograpy3-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "debc557cc2b37d694865e8a7f13d54e4", "sha256": "5f29589f3ceee46c726fe4d07a70103efd9143c4e2d82344e0a68dcc32e9c635" }, "downloads": -1, "filename": "geograpy3-0.1.2.tar.gz", "has_sig": false, "md5_digest": "debc557cc2b37d694865e8a7f13d54e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1282263, "upload_time": "2018-09-21T13:50:17", "url": "https://files.pythonhosted.org/packages/89/c1/9262f8f61f5924a150fd32f2e8b6d4280392d0dae16f9ba454b92adf6084/geograpy3-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "392aad8a3d88bb441ac88af74d4901f9", "sha256": "3a5fc32b6cb3ab5ea5e7de8d2316f95f5951163403909efd8a973f50ce58b50d" }, "downloads": -1, "filename": "geograpy3-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "392aad8a3d88bb441ac88af74d4901f9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 1325436, "upload_time": "2018-09-21T13:50:12", "url": "https://files.pythonhosted.org/packages/57/3e/881a580f03ee257b61b157bc82b011d35cb3174da1b5f48dbeae38c64b87/geograpy3-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "debc557cc2b37d694865e8a7f13d54e4", "sha256": "5f29589f3ceee46c726fe4d07a70103efd9143c4e2d82344e0a68dcc32e9c635" }, "downloads": -1, "filename": "geograpy3-0.1.2.tar.gz", "has_sig": false, "md5_digest": "debc557cc2b37d694865e8a7f13d54e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1282263, "upload_time": "2018-09-21T13:50:17", "url": "https://files.pythonhosted.org/packages/89/c1/9262f8f61f5924a150fd32f2e8b6d4280392d0dae16f9ba454b92adf6084/geograpy3-0.1.2.tar.gz" } ] }