WiktionnaireParser
A library for parsing the french wiktionary.
Installation
Supported Python versions : 3.6+
With Pip
pip install wiktionnaireparser
From source
python setup.py install
Usage
>>> from wiktionnaireparser import WiktionnaireParser as wiktp
>>> page = wiktp.from_source('nage PMT')
>>> page.get_etymology()
'Forme abrégée de nage avec palmes, masque et tuba.'
>>> page.get_parts_of_speech()
{'Locution nominale': ['(Plongée) Nage avec palmes, masque et tuba.']}
It is also possible to pick a word at random.
>>> page.random_page()
>>> page.get_title()
'décrocher'
Use get_word_data to extract and display all data
>>> from wiktionnaireparser import WiktionnaireParser as wtp
>>> page = wtp.from_source('anglophone')
>>> page.get_word_data
{
'title': 'anglophone',
'etymologies': 'Composé du préfixe latin anglo pour anglais et du suffixe -phone.',
'partOfSpeech': {
'Nom commun': {
0: {
'definition': 'Personne parlant la langue anglaise.',
'examples': {
0: {
'example': 'La minorité anglaise avait également reçu, de façon encore plus discrète, une autre «\xa0protection\xa0»: le trésorier du Québec serait un anglophone, un anglophone choisi par les financiers. —\xa0(Laurent Laplante, Paul Berryman, 2000)'
}
}
},
'translations': {
'Allemand': ['Englischsprachige'],
'Anglais': ['English-speaker', 'anglophone'],
'Breton': ['saozneger'],
'Catalan': ['anglòfon', 'anglòfona', 'angloparlant'],
'Espagnol': ['anglófono', 'anglófona', 'anglohablante'],
'Espéranto': ['anglalingvano'],
'Italien': ['anglofono'],
'Néerlandais': ['Engelstalige'],
'Portugais': ['anglófono', 'anglofalante', 'angloparlante'],
'Roumain': ['anglofon']
},
'pronunciation': ['ɑ̃.ɡlɔ.fɔn'],
'gender': 'masculin et féminin identiques',
'Dérivés': ['Anglo-Bami', 'anglo-fou', 'angryphone'],
'Apparentés étymologiques': ['Angleterre', 'anglais', '-phone']
},
'Adjectif': {
0: {
'definition': 'De langue anglaise.',
'examples': {
0: {
'example': "Selon plusieurs penseurs de l'époque, l'État québécois est le seul qui puisse rivaliser avec les grandes entreprises anglophones d'Amérique du Nord. —\xa0(Mathieu Bureau Meunier, Wake up mes bons amis!, Québec, Septentrion, 2019, p. 133.)"
}
}
},
'translations': {
'Allemand': ['englischsprachig'],
'Anglais': ['anglophone'],
'Espagnol': ['anglófono', 'anglohablante'],
'Espéranto': ['anglalingva'],
'Italien': ['anglofono'],
'Kazakh': ['ағылшынтілді'],
'Néerlandais': ['Engelstalig'],
'Norvégien (bokmål)': ['engelskspråklig'],
'Portugais': ['anglófono', 'anglofalante', 'angloparlante'],
'Roumain': ['anglofon']
},
'pronunciation': ['ɑ̃.ɡlɔ.fɔn'],
'gender': 'masculin et féminin identiques',
'Dérivés': ['anglo-fou']
}
}
}
How to contribute
Contributions are more than welcome.
If you're new to Python and would like to contribute, get inspiration from the TODOs.
Metadata
Release files for wiktionnaireparser 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wiktionnaireparser-0.1.tar.gz | 14.6 kB | Without provenance | Details for wiktionnaireparser-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wiktionnaireparser-0.1-py3-none-any.whl | Python 3 | none | any | Details for wiktionnaireparser-0.1-py3-none-any.whl |
Total release size: 48.9 kB
Release files / wiktionnaireparser-0.1.tar.gz
| Download URL | wiktionnaireparser-0.1.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
280d3ccbdb830c065ea5753b9d7817fcdbdc23913b0116c10ecbe217104d30c2
|
|
BLAKE2b-256 checksum How to use checksums |
5908096a83c784b7d6a6adb0e4eea4f2542ac11365679d1d42b38a9da6b0895e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.12
|
Release files / wiktionnaireparser-0.1-py3-none-any.whl
| Download URL | wiktionnaireparser-0.1-py3-none-any.whl |
|---|---|
| Size | 34.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b69440165d261c4e1f519286515fc19b52af794896050313258188f777aefc8d
|
|
BLAKE2b-256 checksum How to use checksums |
0bd8c2f52ebccf28f8988091f0cebe40d08c7590213a93e580550e654ffb8305
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.12
|
Security for wiktionnaireparser 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.