{ "info": { "author": "Jonathon Morgan", "author_email": "jonathon@ushahidi.com", "bugtrack_url": null, "classifiers": [], "description": "Geograpy\n========\n\nExtract place names from a URL or text, and add context to those names\n-- for example distinguishing between a country, region or city.\n\nInstall & Setup\n---------------\n\nGrab the package using ``pip`` (this will take a few minutes)\n\n::\n\n pip install geograpy\n\nGeograpy uses `NLTK `__ for entity recognition, so\nyou'll also need to download the models we're using. Fortunately there's\na command that'll take care of this for you.\n\n::\n\n geograpy-nltk\n\nBasic Usage\n-----------\n\nImport the module, give some text or a URL, and presto.\n\n::\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\nlinked article.\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,\n region or city*\n\nNote that the ``other`` list might be useful for shorter texts, to pull\nout information like street names, points of interest, etc, but at the\nmoment is a bit messy when scanning longer texts that contain possessive\nforms of proper nouns (like \"Russian\" instead of \"Russia\").\n\nBut Wait, There's More\n----------------------\n\nIn addition to listing the names of discovered places, you'll also get\nsome information 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\n geocoding*\n\nLast But Not Least\n------------------\n\nWhile a text might mention many places, it's probably focused on one or\ntwo, so Geograpy also breaks down countries, regions and cities by\nnumber 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\nthe place name and the second item is the number of mentions. For\nexample:\n\n::\n\n [('Russian Federation', 14), (u'Ukraine', 11), (u'Lithuania', 1)] \n\nIf You're Really Serious\n------------------------\n\nYou can of course use each of Geograpy's modules on their own. For\nexample:\n\n::\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::\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\n(``country_regions`` etc) is available after the corresponding ``set_``\nmethod is called.\n\nCredits\n-------\n\nGeograpy uses the following excellent libraries:\n\n- `NLTK `__ for entity recognition\n- `newspaper `__ for text\n extraction from HTML\n- `jellyfish `__ for fuzzy\n text match\n- `pycountry `__ for\n country/region lookups\n\nGeograpy uses the following data sources:\n\n- `GeoLite2 `__ for city\n lookups\n- `ISO3166ErrorDictionary `__\n for common country mispellings *via `Sara-Jayne\n Terp `__*\n\nHat tip to `Chris Albon `__ for the name.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/ushahidi/geograpy/tarball/0.3.4", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ushahidi/geograpy", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "geograpy", "package_url": "https://pypi.org/project/geograpy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/geograpy/", "project_urls": { "Download": "https://github.com/ushahidi/geograpy/tarball/0.3.4", "Homepage": "https://github.com/ushahidi/geograpy" }, "release_url": "https://pypi.org/project/geograpy/0.3.7/", "requires_dist": null, "requires_python": null, "summary": "Extract countries, regions and cities from a URL or text", "version": "0.3.7" }, "last_serial": 1088804, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "768fe897a8eb55de03b23130cdf43e0f", "sha256": "c9223ecc8de43c738677d4ffd31082a0e662da0df22c40580c3a95bc2c52b4ca" }, "downloads": -1, "filename": "geograpy-0.2.tar.gz", "has_sig": false, "md5_digest": "768fe897a8eb55de03b23130cdf43e0f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1281364, "upload_time": "2014-04-10T22:47:10", "url": "https://files.pythonhosted.org/packages/af/ec/40ee6e6272dea62069ca363587dcc7815f929ddd2a1dba9909df5a4cd451/geograpy-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "d19c03196b3ea25f5c2a5bed63b67f48", "sha256": "8257e32c4c593d8faff0791558650360576c90cd508ee74dae3d934d7477f925" }, "downloads": -1, "filename": "geograpy-0.2.1.tar.gz", "has_sig": false, "md5_digest": "d19c03196b3ea25f5c2a5bed63b67f48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1281398, "upload_time": "2014-04-10T22:53:22", "url": "https://files.pythonhosted.org/packages/13/9e/c5033ac979628dc4868e1aeedfd5f0558d2204c638b7ed50e26cc855b7ed/geograpy-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "f6ad87d02e22ab01bec465d0403157f3", "sha256": "286ce669a42a1b88c2c5924a6da1aaf4bf089ac04d10075474e1fe4e43d2686e" }, "downloads": -1, "filename": "geograpy-0.2.2.tar.gz", "has_sig": false, "md5_digest": "f6ad87d02e22ab01bec465d0403157f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1281403, "upload_time": "2014-04-10T22:55:55", "url": "https://files.pythonhosted.org/packages/a6/85/dad123cd0f22f07a0b0a287920f11784b330fae40b86d0dfc693cde23070/geograpy-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "91dd45135eb95d3bcdac853af8349871", "sha256": "f620a2dd58cf72439ddc1be385849aae6cc5e0880475de5f701d3c164134b4ee" }, "downloads": -1, "filename": "geograpy-0.2.3.tar.gz", "has_sig": false, "md5_digest": "91dd45135eb95d3bcdac853af8349871", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1281397, "upload_time": "2014-04-10T23:01:35", "url": "https://files.pythonhosted.org/packages/7f/99/ee97a2633667f38d963b07c3383acdec716f81c80ccc95585eedffde9bde/geograpy-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "a508be1bb358d297b7114afea64fd260", "sha256": "2d97b16fc9bbb8bdf6d5826b799b340fc4ee4439e66f593757cc996a50ba6129" }, "downloads": -1, "filename": "geograpy-0.2.4.tar.gz", "has_sig": false, "md5_digest": "a508be1bb358d297b7114afea64fd260", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1281975, "upload_time": "2014-04-10T23:16:27", "url": "https://files.pythonhosted.org/packages/d1/5c/7020411f4d036ed1c327c22a2f273725546c0eea7d05c6c0dc7a3882a8a8/geograpy-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "a427afcc57f5dbf0f977a7d0fed9fa51", "sha256": "5038368a572238a69388515a344a812b596ecf02f9c0c687d258c52beef840c9" }, "downloads": -1, "filename": "geograpy-0.2.5.tar.gz", "has_sig": false, "md5_digest": "a427afcc57f5dbf0f977a7d0fed9fa51", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1282121, "upload_time": "2014-04-10T23:20:58", "url": "https://files.pythonhosted.org/packages/60/7b/2c2ff5970a642c9b0c8a8ddcdd599ca05ff95fc3649ecbbfbf3d2d41fc03/geograpy-0.2.5.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "569fdf95ee506c0f726ae885595ef58d", "sha256": "316443f289bf3b1c91763035713cfc627abca799d91911b354468bd3e145da5d" }, "downloads": -1, "filename": "geograpy-0.3.0.tar.gz", "has_sig": false, "md5_digest": "569fdf95ee506c0f726ae885595ef58d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1282170, "upload_time": "2014-04-16T23:22:25", "url": "https://files.pythonhosted.org/packages/a0/98/8bd9b905e1f87e9095245a583676299bc36157ee63e3d53293650db63594/geograpy-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "0f45b855d64b3ab4d3f1cf7b5bfcde90", "sha256": "05f20fbe3f4d1fd4ff109b45a320bc92611609571839274e7d1b829fc6da784c" }, "downloads": -1, "filename": "geograpy-0.3.1.tar.gz", "has_sig": false, "md5_digest": "0f45b855d64b3ab4d3f1cf7b5bfcde90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1282231, "upload_time": "2014-04-17T00:10:52", "url": "https://files.pythonhosted.org/packages/64/d4/1078a7df599f3a6be1bbf5f5db2c53c3e8cd483bb70caf39cfe8f872cd10/geograpy-0.3.1.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "6b7077b238f9bd76a54ddb68dfeb7ce0", "sha256": "58d98edd70eb5f99f48bc12efc93de775d4cad90f0b7dbc4c909bad7003fe4e5" }, "downloads": -1, "filename": "geograpy-0.3.3.tar.gz", "has_sig": false, "md5_digest": "6b7077b238f9bd76a54ddb68dfeb7ce0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1282224, "upload_time": "2014-04-17T15:15:32", "url": "https://files.pythonhosted.org/packages/5b/40/48a0cd8791d0d8e41acddedbb01695603c4bab1f17031a8e498b866acf94/geograpy-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "0464708a246aeb5c528f700c7c54ee39", "sha256": "c6f55aafb6612a91a359ef56b5d5832c801e059eec549c6a8b9f074a9f101cb7" }, "downloads": -1, "filename": "geograpy-0.3.4.tar.gz", "has_sig": false, "md5_digest": "0464708a246aeb5c528f700c7c54ee39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1282227, "upload_time": "2014-04-17T15:23:21", "url": "https://files.pythonhosted.org/packages/58/0d/f99b12fde9bf08d69d7edd4c31ed1f15a67c75709e5fbe0bbf7c43f74a3c/geograpy-0.3.4.tar.gz" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "b0f1d5cb972aa61ab715bc926ed24395", "sha256": "de8efa06095762e9c331837412f50b082b1fb1a21824e29f62ef30b97fa3bd72" }, "downloads": -1, "filename": "geograpy-0.3.5.tar.gz", "has_sig": false, "md5_digest": "b0f1d5cb972aa61ab715bc926ed24395", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1282236, "upload_time": "2014-05-09T21:25:32", "url": "https://files.pythonhosted.org/packages/89/84/5d28f29ac996dde576407e7375cfa48db41e0919b8b59255b4d263efd6e1/geograpy-0.3.5.tar.gz" } ], "0.3.7": [ { "comment_text": "", "digests": { "md5": "5916a32f07cbe84e58fb38a920d85416", "sha256": "be5bac6e73a1b00e354e261ecd60d09a4c6301de8ad3866414e7fe721ae67ac4" }, "downloads": -1, "filename": "geograpy-0.3.7.tar.gz", "has_sig": false, "md5_digest": "5916a32f07cbe84e58fb38a920d85416", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1282318, "upload_time": "2014-05-11T20:00:07", "url": "https://files.pythonhosted.org/packages/92/aa/2cb1d246b61555537aad248cb871bd819823330dee3d92315e98499314a6/geograpy-0.3.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5916a32f07cbe84e58fb38a920d85416", "sha256": "be5bac6e73a1b00e354e261ecd60d09a4c6301de8ad3866414e7fe721ae67ac4" }, "downloads": -1, "filename": "geograpy-0.3.7.tar.gz", "has_sig": false, "md5_digest": "5916a32f07cbe84e58fb38a920d85416", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1282318, "upload_time": "2014-05-11T20:00:07", "url": "https://files.pythonhosted.org/packages/92/aa/2cb1d246b61555537aad248cb871bd819823330dee3d92315e98499314a6/geograpy-0.3.7.tar.gz" } ] }