Skip to main content

word's dictionary for several languages

Project description

MLDictionary

MLDictionary is word's dictionary for several language

>>> from mldictionary import English
>>> english_dictionary = English()
>>> snake_means = english_dictionary.get_meanings('snake')
>>> len(snake_means)
4
>>> snake_means
['a reptile with a long body and no legs: ' ...]
...

PyPI    PyPI - License    GitHub Workflow Status (event)    PyPI - Downloads


Installing MLDictionary

$ pip install mldictionary

MLDictionary officially supports 3.9+.


Some examples

>>> from mldictionary import Portuguese
>>> portuguese_dictionary = Portuguese()
>>> vida_means = portuguese_dictionary.get_meanings('vida')
>>> vida_means
['Conjunto dos hábitos e costumes de alguém; maneira de viver: tinha uma vida de milionário.' ...]
>>> from mldictionary import Spanish
>>> spanish_dictionary = Spanish()
>>> coche_means = spanish_dictionary.get_meanings('coche')
>>> coche_means
['Automóvil destinado al transporte de personas y con capacidad no superior a siete plazas.' ...]

Make your own dictionary

from mldictionary import Dictionary

class MyOwnDictionary(Dictionary):
    url = 'somedictionary.com'
    language = 'language name'
    target_tag = 'tag_where_means_is'
    target_attr = {'attr': 'attr_value'}
    replaces = {'something', 'another thing'}

>>> myowndictionary = MyOwnDictionary()
>>> myowndictionary.get_meanings('other language word')

To more details, see the wiki

Also, it has a insightful article on linkedin

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mldictionary-0.2.6.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

mldictionary-0.2.6-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file mldictionary-0.2.6.tar.gz.

File metadata

  • Download URL: mldictionary-0.2.6.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Linux/5.16.12-200.fc35.x86_64

File hashes

Hashes for mldictionary-0.2.6.tar.gz
Algorithm Hash digest
SHA256 986fdc56dc461ea6970798c0f9ca74bc6289dc83369d483a52f8ba96bc1d93e7
MD5 7fde937e46001e50d091817b4eb1bcc0
BLAKE2b-256 3cdf455145a85cf4e37930e142bae83544f324e43be6e5481a85342c8afdb3d1

See more details on using hashes here.

File details

Details for the file mldictionary-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: mldictionary-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Linux/5.16.12-200.fc35.x86_64

File hashes

Hashes for mldictionary-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 86bb1499a02ca84ab6782dc552fbf3e70fb328f0128d81fac3f6993dec187cf0
MD5 70af8f5029c29bb9c1b051df92916e4b
BLAKE2b-256 94528182261256174094df17885e4dff868dbd082c78eab550b423b01df1f8b5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page