Skip to content
This repository has been archived by the owner on Sep 2, 2019. It is now read-only.

Changed setup.py scripts path from 'geograpy/bin/geograpy-nltk' to 'g… #3

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
_Store
venv
geograpy/locs.db
/dist/
/*.egg-info
/*.egg
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified MANIFEST.in
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
9 changes: 9 additions & 0 deletions build/scripts-2.7/geograpy-nltk
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/python

import nltk

nltk.downloader.download('maxent_ne_chunker')
nltk.downloader.download('words')
nltk.downloader.download('treebank')
nltk.downloader.download('maxent_treebank_pos_tagger')
nltk.downloader.download('punkt')
Empty file modified geograpy2/__init__.py
100644 → 100755
Empty file.
9 changes: 9 additions & 0 deletions geograpy2/bin/geograpy-nltk
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env python

import nltk

nltk.downloader.download('maxent_ne_chunker')
nltk.downloader.download('words')
nltk.downloader.download('treebank')
nltk.downloader.download('maxent_treebank_pos_tagger')
nltk.downloader.download('punkt')
78,904 changes: 78,904 additions & 0 deletions geograpy2/data/GeoLite2-City-Locations.csv

Large diffs are not rendered by default.

172 changes: 172 additions & 0 deletions geograpy2/data/ISO3166ErrorDictionary.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
data.un.org entry,Issue,ISO3166 name or code,,,
Ã…land Islands,spelling,Åland Islands,,,
"Afghanistan, Islamic State of",spelling,Afghanistan,,,
"Bahamas, The",spelling,Bahamas,,,
Bolivia,spelling,"Bolivia, Plurinational State of",,,
Bosnia Herzegovina,spelling,Bosnia and Herzegovina,,,
British Indian Ocean Ter,spelling,British Indian Ocean Territory,,,
Brunei,spelling,Brunei Darussalam,,,
C\xc3\xb4te d\xe2\x80\x99Ivoire,spelling,Côte d'Ivoire,,,
C\xc3\xb4te d'Ivoire,spelling,Côte d'Ivoire,,,
C\xf4te d'Ivoire,spelling,Côte d'Ivoire,,,
Cote d'Ivoire,spelling,Côte d'Ivoire,,,
Ivory Coast,spelling,Côte d'Ivoire,,,
Central African Republic,spelling,Central African Republic,,,
"China, People's Republic of",spelling,China,,,
"Christmas Island, Aust",spelling,Christmas Island,#true?,,
"Cocos, Keeling Islands",spelling,Cocos (Keeling) Islands,,,
"Congo, Republic",spelling,Congo,,,
Congo Democratic Republic,spelling,"Congo, The Democratic Republic of the",,,
"Congo, Democratic Republic",spelling,"Congo, The Democratic Republic of the",,,
"Congo, Democratic Republic of the",spelling,"Congo, The Democratic Republic of the",,,
"Congo, Democratic Republic of",spelling,"Congo, The Democratic Republic of the",,,
Democratic Republic of Congo,spelling,"Congo, The Democratic Republic of the",,,
Democratic Republic of the Congo,spelling,"Congo, The Democratic Republic of the",,,
Cook Islands,spelling,Cook Islands,,,
Czech Republic,spelling,Czech Republic,,,
Czechoslovakia (former),spelling,"Czechoslovakia, Czechoslovak Socialist Republic",,,
Czechoslovakia,spelling,"Czechoslovakia, Czechoslovak Socialist Republic",,,
"Czechoslovakia, former",spelling,"Czechoslovakia, Czechoslovak Socialist Republic",,,
Former Czechoslovakia,spelling,"Czechoslovakia, Czechoslovak Socialist Republic",,,
Dominican Republic,spelling,Dominican Republic,,,
"Egypt, Arab Republic",spelling,Egypt,,,
Ethiopia PDR,spelling,Ethiopia,,,
"Ethiopia, from 1993",spelling,Ethiopia,,,
"Ethiopia, up to 1993",spelling,Ethiopia,true?,,
Former Ethiopia,spelling,Ethiopia,true?,,
"Falkland Island, Malvinas",spelling,Falkland Islands (Malvinas),,,
Falkland Islands,spelling,Falkland Islands (Malvinas),,,
"Falkland Islands, Malvinas",spelling,Falkland Islands (Malvinas),,,
Faeroe Islands,spelling,Faroe Islands,,,
French Southern Terr,spelling,French Southern Territories,,,
Gambia The,spelling,Gambia,,,
"Gambia, The",spelling,Gambia,,,
German Democratic Republic (former),spelling,German Democratic Republic,,,
"German Democratic Republic, former",spelling,German Democratic Republic,,,
"Germany, The former German Democratic Republic",spelling,German Democratic Republic,,,
Fmr Federated Republic of Germany,spelling,"Germany, Federal Republic of",,,
"Germany, Federated Republic of before 3.10.1990",spelling,"Germany, Federal Republic of",,,
Holy See,spelling,Holy See (Vatican City State),,,
"Holy See, Vatican",spelling,Holy See (Vatican City State),,,
"China, Hong Kong SAR",spelling,Hong Kong,,,
"China, Hong Kong Special Administrative Region",spelling,Hong Kong,,,
China: Hong Kong SAR,spelling,Hong Kong,,,
Hong Kong SAR,spelling,Hong Kong,,,
"Hong Kong SAR, China",spelling,Hong Kong,,,
"Hong Kong, China",spelling,Hong Kong,,,
Iran,spelling,"Iran, Islamic Republic of",,,
Iran(Islamic Republic of),spelling,"Iran, Islamic Republic of",,,
"Iran, Islamic Republic of",spelling,"Iran, Islamic Republic of",,,
"Iran, Islamic Republic",spelling,"Iran, Islamic Republic of",,,
Islamic Republic of Iran,spelling,"Iran, Islamic Republic of",,,
Democratic People's Republic of Korea,spelling,"Korea, Democratic People's Republic of",,,
Korea DPR,spelling,"Korea, Democratic People's Republic of",,,
"Korea, Democratic Republic",spelling,"Korea, Democratic People's Republic of",,,
"Korea, DemocraticPpl's.Republic",spelling,"Korea, Democratic People's Republic of",,,
"Korea,DemocraticPpl's.Republic",spelling,"Korea, Democratic People's Republic of",,,
Korea Rep,spelling,"Korea, Republic of",,,
"Korea, Republic of",spelling,"Korea, Republic of",,,
"Korea, Republic",spelling,"Korea, Republic of",,,
Republic of Korea,spelling,"Korea, Republic of",,,
Lao P.D.R.,spelling,Lao People's Democratic Republic,,,
Lao PDR,spelling,Lao People's Democratic Republic,,,
Lao People's Democratic Republic,spelling,Lao People's Democratic Republic,,,
Libya,spelling,Libyan Arab Jamahiriya,,,
Libyan Arab Jamah.,spelling,Libyan Arab Jamahiriya,,,
"China, Macao SAR",spelling,Macao,,,
"China, Macao Special Administrative Region",spelling,Macao,,,
China: Macao SAR,spelling,Macao,,,
"Macao SAR, China",spelling,Macao,,,
"Macao, China",spelling,Macao,,,
Macau SAR,spelling,Macao,,,
"Macau, China",spelling,Macao,,,
"Macau, SAR",spelling,Macao,,,
Macedonia,spelling,"Macedonia, Republic of",,,
"Macedonia, FYR",spelling,"Macedonia, Republic of",,,
"Macedonia, The former Yugoslav Republic of",spelling,"Macedonia, Republic of",,,
T.F.Y.R. Macedonia,spelling,"Macedonia, Republic of",,,
T.F.Yug.Republic Macedonia,spelling,"Macedonia, Republic of",,,
TFYR Macedonia,spelling,"Macedonia, Republic of",,,
TFYR of Macedonia,spelling,"Macedonia, Republic of",,,
The f. Yugosl. Rep of Macedonia,spelling,"Macedonia, Republic of",,,
The Former Yugoslav Republic of Macedonia,spelling,"Macedonia, Republic of",,,
"Micronesia, Federated States of",spelling,"Micronesia, Federated States of",,,
"Micronesia, Federated Sts.",spelling,"Micronesia, Federated States of",,,
"Micronesia, FederatedStates of",spelling,"Micronesia, Federated States of",,,
Moldova,spelling,"Moldova, Republic of",,,
Republic of Moldova,spelling,"Moldova, Republic of",,,
Neth. Antilles,spelling,Netherlands Antilles,,,
Netherlands Antilles and Aruba,spelling,Netherlands Antilles,,,True?
Pacific Island,spelling,Pacific Islands (trust territory),,,
"Pacific Islands, Trust Territory",spelling,Pacific Islands (trust territory),,,
Occ. Palestinian Terr.,spelling,"Palestinian Territory, Occupied",,,
Palestinian Territories,spelling,"Palestinian Territory, Occupied",,,
Palestine,spelling,"Palestinian Territory, Occupied",#true?,,
Palestinian Authority,spelling,"Palestinian Territory, Occupied",#true?,,
Pitcairn Islands,spelling,Pitcairn,,,
Réunion,spelling,Reunion,fix,,
Russia,spelling,Russian Federation,true?,,
Saint Helena and Depend.,spelling,"Saint Helena, Ascension and Tristan da Cunha",,,
Saint Helena,spelling,"Saint Helena, Ascension and Tristan da Cunha",#true?,,
Saint Kitts-Nevis,spelling,Saint Kitts and Nevis,,,
Saint Lucia ),spelling,Saint Lucia,,,
"Saint Martin, French part",spelling,Saint Martin (French part),,,
Saint Pierre-Miquelon,spelling,Saint Pierre and Miquelon,,,
Saint Vincent and Grenadines,spelling,Saint Vincent and the Grenadines,,,
Saint Vincent-Grenadines,spelling,Saint Vincent and the Grenadines,,,
Solomon Islands,spelling,Solomon Islands,,,
Svalbard and Jan Mayen Islands,spelling,Svalbard and Jan Mayen,,,
Syria,spelling,Syrian Arab Republic,,,
Tanzania,spelling,"Tanzania, United Republic of",,,
United Republic of Tanzania,spelling,"Tanzania, United Republic of",,,
United RepublicTanzania,spelling,"Tanzania, United Republic of",,,
Timor Leste,spelling,Timor-Leste,,,
Turks and Caicos Islands,spelling,Turks and Caicos Islands,,,
United Kingdom of Great Britain & Northern Ireland,spelling,United Kingdom,,,
Usa,spelling,United States,,,
"United States of America, pacific Islands",spelling,US Miscellaneous Pacific Islands,,,
US Miscellaneous Pacific Islands,spelling,US Miscellaneous Pacific Islands,,,
Former USSR,spelling,"USSR, Union of Soviet Socialist Republics",,,
Union of Soviet Socialist Republics (former),spelling,"USSR, Union of Soviet Socialist Republics",,,
"Union of Soviet Socialist Republics, former",spelling,"USSR, Union of Soviet Socialist Republics",,,
Ussr,spelling,"USSR, Union of Soviet Socialist Republics",,,
Venezuela,spelling,"Venezuela, Bolivarian republic of",,,
"Venezuela, Bolivarian Republic of",spelling,"Venezuela, Bolivarian republic of",,,
"Venezuela, RB",spelling,"Venezuela, Bolivarian republic of",,,
"Viet Nam, Democratic Republic of",spelling,Viet Nam,,,
Vietnam,spelling,Viet Nam,,,
United States Virgin Island,spelling,"Virgin Islands, U.S.",,,
United States Virgin Islands,spelling,"Virgin Islands, U.S.",,,
US Virgin Islands,spelling,"Virgin Islands, U.S.",,,
"Virgin Islands, US",spelling,"Virgin Islands, U.S.",,,
Wake Is,spelling,Wake Island,,,
Wallis & Futuna Islands,spelling,Wallis and Futuna,,,
Wallis and Futuna Islands,spelling,Wallis and Futuna,,,
"Yemen, Republic",spelling,Yemen,,,
"Yemen, Republic of",spelling,Yemen,,,
Democratic Yemen (former),spelling,"Yemen, Democratic, People's Democratic Republic of",,,
"Democratic Yemen, former",spelling,"Yemen, Democratic, People's Democratic Republic of",,,
"Yemen, The former Democratic",spelling,"Yemen, Democratic, People's Democratic Republic of",,,
Yemen: Former Democratic Yemen,spelling,"Yemen, Democratic, People's Democratic Republic of",,,
Yemen Arab Republic (former),spelling,"Yemen, Yemen Arab Republic",,,
"Yemen Arab Republic, former",spelling,"Yemen, Yemen Arab Republic",,,
Yemen: Former Yemen Arab Republic,spelling,"Yemen, Yemen Arab Republic",,,
Former Yugoslavia,spelling,"Yugoslavia, Socialist Federal Republic of",,,
Yugoslav SFR,spelling,"Yugoslavia, Socialist Federal Republic of",,,
Yugoslavia (former Socialist Federal Republic),spelling,"Yugoslavia, Socialist Federal Republic of",,,
Yugoslavia,spelling,"Yugoslavia, Socialist Federal Republic of",,,
"Yugoslavia, former Socialist Federal Republic",spelling,"Yugoslavia, Socialist Federal Republic of",,,
"Yugoslavia, The former Socialist Federated Republic of",spelling,"Yugoslavia, Socialist Federal Republic of",,,
East Timor,withdrawn,TMP,,,
"Czechoslovakia, Czechoslovak Socialist Republic",withdrawn,CSK,,,
"USSR, Union of Soviet Socialist Republics",withdrawn,SUN,,,
"Yemen, Yemen Arab Republic",withdrawn,YEM,,,
"Yemen, Democratic, People's Democratic Republic of",withdrawn,YMD,,,
"Yugoslavia, Socialist Federal Republic of",withdrawn,YUG,,,
"Germany, Federal Republic of",withdrawn,DEU,,,
German Democratic Republic,withdrawn,DDR,,,
US Miscellaneous Pacific Islands,withdrawn,PUS,,,
Wake Island,withdrawn,WAK,,,
Serbia and Montenegro,withdrawn,SCG,,,
Netherlands Antilles,withdrawn,ANT,,,
Pacific Islands (trust territory),withdrawn,PCI,,,
2 changes: 1 addition & 1 deletion geograpy2/extraction.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -60,5 +60,5 @@ def find_entities(self):
nes = self.named_entities()
for ne in nes:
if type(ne) is nltk.tree.Tree:
if ne.label() in ['GPE', 'PERSON', 'ORGANIZATION']:
if ne.node in ['GPE', 'PERSON', 'ORGANIZATION']:
self.places.append(u' '.join([i[0] for i in ne.leaves()]))
Binary file removed geograpy2/extraction.pyc
Binary file not shown.
Empty file modified geograpy2/place.py
100644 → 100755
Empty file.
Empty file modified geograpy2/placecontext.py
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion setup.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@
'jellyfish',
'pycountry'
],
scripts=['geograpy/bin/geograpy-nltk'],
scripts=['geograpy2/bin/geograpy-nltk'],
package_data = {
'geograpy': ['data/*.csv'],
},
Empty file modified tests/__init__.py
100644 → 100755
Empty file.
Empty file modified tests/test_extractor.py
100644 → 100755
Empty file.
Empty file modified tests/test_package.py
100644 → 100755
Empty file.
Empty file modified tests/test_place.py
100644 → 100755
Empty file.
Empty file modified tests/test_placecontext.py
100644 → 100755
Empty file.