{"id":26279684,"url":"https://github.com/alephdata/countrytagger","last_synced_at":"2025-05-07T03:04:17.263Z","repository":{"id":52206346,"uuid":"238416691","full_name":"alephdata/countrytagger","owner":"alephdata","description":"Extract names of places from text and determine which country they may refer to","archived":false,"fork":false,"pushed_at":"2021-05-05T08:14:17.000Z","size":695,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-07T03:03:29.673Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alephdata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-05T09:50:32.000Z","updated_at":"2024-06-13T15:52:06.000Z","dependencies_parsed_at":"2022-08-29T23:31:37.418Z","dependency_job_id":null,"html_url":"https://github.com/alephdata/countrytagger","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alephdata%2Fcountrytagger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alephdata%2Fcountrytagger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alephdata%2Fcountrytagger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alephdata%2Fcountrytagger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alephdata","download_url":"https://codeload.github.com/alephdata/countrytagger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252804206,"owners_count":21806769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-14T14:16:00.213Z","updated_at":"2025-05-07T03:04:17.239Z","avatar_url":"https://github.com/alephdata.png","language":"Python","readme":"# countrytagger\n\nThis library finds the names of places in a string of text and tries to associate\nthem with countries. The goal is to tag a piece (or set) of text with country\nmetadata. The place names are derived from the GeoNames database, and they include\nnames of countries, major administrative areas and large cities. Place names that\nare used in several countries are not used.\n\n## Usage\n\n```python\nimport countrytagger\n\n# match in a string using sequential matching:\ntext = 'I am in Berlin'\nfor (code, score, country) in countrytagger.tag_text_countries(text):\n    print(score, country)\n\n# find precise matches:\ncode, score, country = countrytagger.tag_place('Berlin')\n```\n\n## Building the data\n\nYou can re-generate the place database like this:\n\n```bash\n$ make generate\n```\n\nThis will download GeoNames and parse it into the format used by this library.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falephdata%2Fcountrytagger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falephdata%2Fcountrytagger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falephdata%2Fcountrytagger/lists"}