{"id":20737453,"url":"https://github.com/candlewill/retrofitting-master","last_synced_at":"2026-04-19T18:33:31.705Z","repository":{"id":71816623,"uuid":"53101577","full_name":"candlewill/retrofitting-master","owner":"candlewill","description":"Python 3.x version vectors retrofittings","archived":false,"fork":false,"pushed_at":"2016-03-04T02:40:22.000Z","size":9497,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T11:34:37.695Z","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":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/candlewill.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-04T02:38:39.000Z","updated_at":"2016-03-04T02:40:24.000Z","dependencies_parsed_at":"2023-02-28T16:45:53.436Z","dependency_job_id":null,"html_url":"https://github.com/candlewill/retrofitting-master","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/candlewill/retrofitting-master","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candlewill%2Fretrofitting-master","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candlewill%2Fretrofitting-master/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candlewill%2Fretrofitting-master/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candlewill%2Fretrofitting-master/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/candlewill","download_url":"https://codeload.github.com/candlewill/retrofitting-master/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candlewill%2Fretrofitting-master/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32018046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-17T06:14:33.314Z","updated_at":"2026-04-19T18:33:31.664Z","avatar_url":"https://github.com/candlewill.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#Retrofitting\nManaal Faruqui, mfaruqui@cs.cmu.edu\n\nThis tool is used to post-process word vectors to incorporate\nknowledge from semantic lexicons. As shown in Faruqui et al, 2014\nthese word vectors are generally better in performance on semantic\ntasks than the original word vectors. This tool can be used for\nword vectors obtained from any vector training model.\n\n###Requirements\n\n1. Python 2.7\n\n###Data you need\n1. Word vector file\n2. Lexicon file (provided here)\n\nEach vector file should have one word vector per line as follows (space delimited):-\n\n```the -1.0 2.4 -0.3 ...```\n\n###Running the program\n\n```python retrofit.py -i word_vec_file -l lexicon_file -n num_iter -o out_vec_file```\n\n```python retrofit.py -i sample_vec.txt -l lexicons/ppdb-xl.txt -n 10 -o out_vec.txt```\n\nwhere, 'n' is an integer which specifies the number of iterations for which the\noptimization is to be performed.  Usually n = 10 gives reasonable results.\n\n###Output\nFile: ```out_vec.txt```\n\nwhich are your new retrofitted and (hopefully) improved word vectors, enjoy !\n\n###Reference\n\nMain paper to be cited\n```\n@InProceedings{faruqui:2014:NIPS-DLRLW,\n  author    = {Faruqui, Manaal and Dodge, Jesse and Jauhar, Sujay K.  and  Dyer, Chris and Hovy, Eduard and Smith, Noah A.},\n  title     = {Retrofitting Word Vectors to Semantic Lexicons},\n  booktitle = {Proceedings of NAACL},\n  year      = {2015},\n}\n```\n\nIf you are using PPDB (Ganitkevitch et al, 2013), WordNet (Miller, 1995) or FrameNet (Baker et al, 1998) for enrichment please cite the corresponding papers.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcandlewill%2Fretrofitting-master","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcandlewill%2Fretrofitting-master","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcandlewill%2Fretrofitting-master/lists"}