{"id":16750467,"url":"https://github.com/mberr/freebase_to_wikidata","last_synced_at":"2025-07-06T22:10:03.227Z","repository":{"id":109085079,"uuid":"190047312","full_name":"mberr/freebase_to_wikidata","owner":"mberr","description":null,"archived":false,"fork":false,"pushed_at":"2019-06-03T17:48:23.000Z","size":169,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T17:11:26.271Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mberr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-03T17:03:08.000Z","updated_at":"2019-06-04T07:24:43.000Z","dependencies_parsed_at":"2023-03-24T08:46:58.379Z","dependency_job_id":null,"html_url":"https://github.com/mberr/freebase_to_wikidata","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberr%2Ffreebase_to_wikidata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberr%2Ffreebase_to_wikidata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberr%2Ffreebase_to_wikidata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberr%2Ffreebase_to_wikidata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mberr","download_url":"https://codeload.github.com/mberr/freebase_to_wikidata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243825536,"owners_count":20354095,"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":"2024-10-13T02:28:14.738Z","updated_at":"2025-03-16T04:25:46.320Z","avatar_url":"https://github.com/mberr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# freebase_to_wikidata\nThis repository offers translation between [FB15k-237](https://www.microsoft.com/en-us/download/details.aspx?id=52312) IDs to [Wikidata](https://www.wikidata.org/wiki/Wikidata:Main_Page) IDs and labels.\n\n## How to create the translation table\n* Download [FB15k-237](https://www.microsoft.com/en-us/download/details.aspx?id=52312)\n* Create a list of all requested entities using\n```bash\nunzip -p FB15K-237.2.zip Release/{train,valid,test}.txt | \\\ndos2unix | awk '{print $1\"\\n\"$2\"\\n\"$3}' | sort | uniq \u003e freebase_ids.csv\n```\n* Create a file for mapping Wikidata ID \u003c-\u003e Freebase ID and Wikidata ID \u003c-\u003e English label\n```bash\nwget https://dumps.wikimedia.org/wikidatawiki/entities/latest-truthy.nt.bz2 \\\n-O - | lbzcat -v -n 8 | grep -E \"direct/P646|schema.org/name\u003e .*@en \\.\" | tee \\\n\u003e(grep \"direct/P646\" | cut -d\" \" -f1,3- | sed 's/ \\.//g' \u003e wikidata.to.freebase.tsv)\\\n\u003e(grep \"\u003chttp://schema.org/name\u003e\" | cut -d\" \" -f1,3- | sed 's/@en \\.//g' \u003e wikidata.to.label.tsv) \\\n\u003e /dev/null\n``` \n* Run `create_mapping.py` to create JSON file `translation.json`. You can use `--data_root` to specify the directory of the preprocessed files from the previous steps, and `--output_root` to change the output directory (both default to the current working directory).  \n```bash\npython3 create_mapping.py --data_root=. --output_root=.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmberr%2Ffreebase_to_wikidata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmberr%2Ffreebase_to_wikidata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmberr%2Ffreebase_to_wikidata/lists"}