{"id":17649279,"url":"https://github.com/abuccts/wiktionary-lookup","last_synced_at":"2025-05-07T06:21:35.823Z","repository":{"id":137823823,"uuid":"84442005","full_name":"abuccts/wiktionary-lookup","owner":"abuccts","description":"lookup words and pronunciations in Wiktionary","archived":false,"fork":false,"pushed_at":"2019-07-05T09:14:18.000Z","size":41,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T07:11:12.674Z","etag":null,"topics":["parser","pronunciation","python","wiktionary"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abuccts.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":"2017-03-09T12:53:25.000Z","updated_at":"2023-09-08T17:22:00.000Z","dependencies_parsed_at":"2023-06-26T01:59:12.011Z","dependency_job_id":null,"html_url":"https://github.com/abuccts/wiktionary-lookup","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/abuccts%2Fwiktionary-lookup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abuccts%2Fwiktionary-lookup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abuccts%2Fwiktionary-lookup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abuccts%2Fwiktionary-lookup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abuccts","download_url":"https://codeload.github.com/abuccts/wiktionary-lookup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252825097,"owners_count":21809893,"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":["parser","pronunciation","python","wiktionary"],"created_at":"2024-10-23T11:25:19.343Z","updated_at":"2025-05-07T06:21:35.805Z","avatar_url":"https://github.com/abuccts.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"wiktionary lookup\n=================\n\n__[Notice] This repository was deprecated, please use [wikt2pron](https://github.com/abuccts/wikt2pron) instead.__\n\n[![Build Status](https://travis-ci.org/abuccts/wiktionary-lookup.svg?branch=master)](https://travis-ci.org/abuccts/wiktionary-lookup)\n[![Coverage Status](https://coveralls.io/repos/github/abuccts/wiktionary-lookup/badge.svg?branch=master)](https://coveralls.io/github/abuccts/wiktionary-lookup?branch=master)\n[![BSD licensed](https://img.shields.io/badge/License-BSD-blue.svg)](LICENSE)\n\nA Python toolkit which looks up given words in [Wiktionary](https://www.wiktionary.org/) and returns structured Python dict format. Support the following list at present,\n* languages\n* parts of speech\n* pronunciations (IPA, CMUBET, enPR, audio link)\n\nRequirements\n------------\n\nWritten in pure Python, compatible with Python 2.6+ and 3.2+, no dependencies.\n\nInstallation\n------------\n\n```sh\n# download the latest version\n$ git clone https://github.com/abuccts/wiktionary-lookup.git\n$ cd wiktionary-lookup\n\n# install and run test\n$ python setup.py install\n$ python setup.py -q test\n```\n\nUsage\n-----\n\nFirst, create an instance of `Wiktionary` class:\n```py\n\u003e\u003e\u003e from pywiktionary import Wiktionary\n\u003e\u003e\u003e wikidict = Wiktionary(lang=\"English\", CMUBET=True, phoneme_only=False)\n```\nLookup a word using `lookup` method:\n```py\n\u003e\u003e\u003e word = wikidict.lookup(\"read\")\n```\nThe entry of word \"read\" is at https://en.wiktionary.org/wiki/read#English, and here is the lookup result:\n```py\n\u003e\u003e\u003e from pprint import pprint\n\u003e\u003e\u003e pprint(word)\n{'English': {'Part of Speech': ['Verb', 'Noun'],\n             'Pronunciation': [{'CMUBET': ['R IY D .'],\n                                'IPA': (['/ɹiːd/'], 'en'),\n                                'enPR': 'rēd'},\n                               {'Audio': ('En-uk-to read.ogg',\n                                          'Audio (UK)',\n                                          'en')},\n                               {'Audio': ('en-us-read.ogg',\n                                          'Audio (US)',\n                                          'en')},\n                               {'CMUBET': ['R EH D .'],\n                                'IPA': (['/ɹɛd/'], 'en'),\n                                'enPR': 'rĕd'},\n                               {'Audio': ('en-us-read-past.ogg',\n                                          'Audio (US)',\n                                          'en')}]}}\n```\nTo lookup a word in a different language, specify the `lang` parameter (`CMUBET` parameter is only available for `lang=\"English\"` at present):\n```py\n\u003e\u003e\u003e word = wikidict.lookup(\"читать\", lang=\"Russian\")\n\u003e\u003e\u003e pprint(word)\n{'Russian': {'Part of Speech': ['Verb'],\n             'Pronunciation': [{'IPA': (['[t͡ɕɪˈtatʲ]'], 'ru')},\n                               {'Audio': ('Ru-читать.ogg', 'Audio', 'ru')}]}}\n```\nPlease note that the default language of `wikidict` is `\"English\"` which is set when the instance is created. To change the language of `wikidict` permanently, create another instance of `Wiktionary` class or use `set_lang` function:\n```py\n\u003e\u003e\u003e wikidict.set_lang(\"French\")\n\u003e\u003e\u003e word = wikidict.lookup(\"être\")\n\u003e\u003e\u003e pprint(word)\n{'French': {'Part of Speech': ['Verb', 'Noun'],\n            'Pronunciation': [{'IPA': (['/ɛtʁ/'], 'fr')},\n                              {'Audio': ('Fr-être-fr-ouest.ogg',\n                                         'Audio (France, West)',\n                                         'fr')},\n                              {'Accent': 'Quebec', 'IPA': (['[aɛ̯tʁ]'], 'fr')},\n                              {'Audio': ('Qc-être.ogg',\n                                         'Audio (Quebec, Montreal)',\n                                         'fr')},\n                              {'Accent': 'Louisiana',\n                               'IPA': (['[ɛt(ɾ)]'], 'fr')}]}}\n```\nFor phoneme only output without other information, set `phoneme_only` parameter to `True`:\n```py\n\u003e\u003e\u003e word_phoneme = wikidict.lookup(\"être\", phoneme_only=True)\n\u003e\u003e\u003e pprint(word_phoneme)\n{'IPA': ['/ɛtʁ/', '[aɛ̯tʁ]', '[ɛt(ɾ)]']}\n\n```\n\nMore exmaples of different languages can be found at [Example Index Wiki Page](https://github.com/abuccts/wiktionary-lookup/wiki/Example%20Index).\n\n\nFor command line interface, please refer to [Command Line Usage Wiki Page](https://github.com/abuccts/wiktionary-lookup/wiki/Command-Line-Usage).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabuccts%2Fwiktionary-lookup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabuccts%2Fwiktionary-lookup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabuccts%2Fwiktionary-lookup/lists"}