{"id":24487050,"url":"https://github.com/supersonichub1/reverse-dictionary","last_synced_at":"2026-02-20T01:31:23.954Z","repository":{"id":107108910,"uuid":"570204867","full_name":"SuperSonicHub1/reverse-dictionary","owner":"SuperSonicHub1","description":"An implementation of a reverse dictionary using txtai.","archived":false,"fork":false,"pushed_at":"2022-11-24T15:22:25.000Z","size":22,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-23T01:51:05.628Z","etag":null,"topics":["dictionary","python","reverse-dictionary","sentence-transformers","txtai","wordnet"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SuperSonicHub1.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":"2022-11-24T15:22:13.000Z","updated_at":"2025-01-24T10:22:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"e38e13be-e2a0-4646-a1ec-26d1aa551a59","html_url":"https://github.com/SuperSonicHub1/reverse-dictionary","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SuperSonicHub1/reverse-dictionary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperSonicHub1%2Freverse-dictionary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperSonicHub1%2Freverse-dictionary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperSonicHub1%2Freverse-dictionary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperSonicHub1%2Freverse-dictionary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SuperSonicHub1","download_url":"https://codeload.github.com/SuperSonicHub1/reverse-dictionary/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperSonicHub1%2Freverse-dictionary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29638632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T22:32:43.237Z","status":"ssl_error","status_checked_at":"2026-02-19T22:32:38.330Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dictionary","python","reverse-dictionary","sentence-transformers","txtai","wordnet"],"created_at":"2025-01-21T15:32:42.002Z","updated_at":"2026-02-20T01:31:23.918Z","avatar_url":"https://github.com/SuperSonicHub1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# An implementation of a reverse dictionary using txtai\n\n[Simon Willison](https://simonwillison.net/) recently starred\n[txtai](https://github.com/neuml/txtai), a neato multitool for\nbuilding AI-powered search apps, and I realized then that the\nlibrary could be used to make something I've wanted since the\ndawn of time: a good [reverse dictionary](https://en.wikipedia.org/wiki/Conceptual_dictionary).\n\nMost of the existing ones suck because humans have a tendency\nto [paraphrase](https://en.wikipedia.org/wiki/Paraphrase), meaning\nthe concept of a word in your head doesn't\nmatch up with what the dictionary authors think. Understanding\nlanguage through brute-force with transformers seems to do the trick now a days,\nso I thought I'd give an AI twist on the concept it a try.\n\n## Creation\n\nI was able to make a command-propmpt prototype in about an hour due to the excellent\n[wn](https://github.com/goodmami/wn) library and txtai's great tutorials.\n\nWordNet is a perfect dictionary for this project, as it clearly separates definitions\n(synsets) from their words, which helps us to account for synonyms and the like.\n\nAll in all, I was able to go from idea to prototype in about an hour\n(that includes training 120,039 synsets for 163,161 words), which is honestly\namazing. It isn't perfect, but I'm sure there's a lot of knobs I can turn in order to\nmake it better, along with getting a larger dictionary. Transformers are the future, baby!\n\n## Run\n\n```\ngit clone https://github.com/supersonichub1/reverse-dictionary\ncd reverse-dictionary\npoetry install\npoetry run python create_index.py\npoetry run python query_index.py\n```\n\n## Demonstration\n```\n$ python query_index.py\n\u003e bird that sings\nClosest words: songster, songbird (score of 0.7369604110717773)\n\u003e to copy someone else in jest\nClosest word: impersonate (score of 0.7036008834838867)\n\u003e an outing with a love interest\nClosest word: date (score of 0.5460328459739685)\n\u003e something that stores data\nClosest word: descriptor (score of 0.5796446800231934)\n\u003e something that doesn't catch fire\nClosest words: smoulder, smolder (score of 0.5455739498138428)\n\u003e board game where you buy properties\nClosest word: Monopoly (score of 0.7235665321350098)\n\u003e see-through object\nClosest words: prism, optical prism (score of 0.6346988677978516)\n\u003e ball of rice\nClosest word: rice (score of 0.5870095491409302)\n\u003e a machine that does tasks according to its programming \nClosest words: run, execute (score of 0.6618992686271667)\n\u003e distress caused by being away from home\nClosest words: lonely, lonesome (score of 0.5635539889335632)\n```\n\n## Future Improvements\n- use the [semantic graph](https://github.com/neuml/txtai/blob/master/examples/38_Introducing_the_Semantic_Graph.ipynb) to connect synsets to their [relations](https://wn.readthedocs.io/en/latest/api/wn.html#wn.Synset.relations)\n- make a web UI\n- use a [multilingual WordNet](https://github.com/goodmami/wn#open-multilingual-wordnet-omw-collection) with a multilingual model\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupersonichub1%2Freverse-dictionary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupersonichub1%2Freverse-dictionary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupersonichub1%2Freverse-dictionary/lists"}