Skip to main content

CLI-based german dictionary

Project description

Duden Build Status Version

duden is a CLI-based program and python module, which can provide various information about given german word. The provided data are parsed from german dictionary duden.de.

duden screenshot

Installation

pip3 install duden

Usage

CLI

$ duden Löffel

Löffel, der
===========
Word type: Substantiv, maskulin
Commonness: 2/5
Separation: Löf|fel
Meaning overview:
 0.  a. [metallenes] [Ess]gerät, an dessen unterem Stielende eine schalenartige Vertiefung sitzt und das zur Aufnahme von Suppe, Flüssigkeiten, zur Zubereitung von Speisen o. Ä. verwendet wird
     b. (Medizin) Kürette

 1. (Jägersprache) Ohr von Hase und Kaninchen

Synonyms:
Ohr; [Ge]hörorgan; (salopp) Horcher, Horchlappen, Lauscher; (Jägersprache) Loser, Teller
Full CLI syntax (expand)
$ duden --help
usage: duden [-h] [--title] [--name] [--article] [--part-of-speech]
             [--frequency] [--usage] [--word-separation]
             [--meaning-overview] [--synonyms] [--origin]
             [--compounds [COMPOUNDS]] [-g [GRAMMAR]] [--export]
             [--words-before] [--words-after] [-r RESULT] [--fuzzy]
             [--no-cache] [-V] [--phonetic] [--alternative-spellings]
             word

positional arguments:
  word

optional arguments:
  -h, --help            show this help message and exit
  --title               display word and article
  --name                display the word itself
  --article             display article
  --part-of-speech      display part of speech
  --frequency           display commonness (1 to 5)
  --usage               display context of use
  --word-separation     display proper separation (line separated)
  --meaning-overview    display meaning overview
  --synonyms            list synonyms (line separated)
  --origin              display origin
  --compounds [COMPOUNDS]
                        list common compounds
  -g [GRAMMAR], --grammar [GRAMMAR]
                        list grammar forms
  --export              export parsed word attributes in yaml format
  --words-before        list 5 words before this one
  --words-after         list 5 words after this one
  -r RESULT, --result RESULT
                        display n-th (starting from 1) result in case of multiple words matching the input
  --fuzzy               enable fuzzy word matching
  --no-cache            do not cache retrieved words
  -V, --version         print program version
  --phonetic            display pronunciation
  --alternative-spellings
                        display alternative spellings

Module usage

>>> import duden
>>> w = duden.get('Loeffel')
>>> w.name
'Löffel'
>>> w.word_separation
['Löf', 'fel']
>>> w.synonyms
'Ohr; [Ge]hörorgan; (salopp) Horcher, Horchlappen, Lauscher; (Jägersprache) Loser, Teller'

For more examples see usage documentation.

Dependencies

Python modules:

  • beautifulsoup4
  • requests
  • crayons
  • pyxdg
  • pyyaml

Testing

make test

Supported versions of Python

  • Python 3

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

duden-0.17.0.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

duden-0.17.0-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file duden-0.17.0.tar.gz.

File metadata

  • Download URL: duden-0.17.0.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for duden-0.17.0.tar.gz
Algorithm Hash digest
SHA256 8f42726d63caa13d0fec4695f5a4c5d3d4a1d4504e43746c04dcff34b37ccaf6
MD5 ed376e41bfea079aaba3f91d6587654c
BLAKE2b-256 2e4006fbb4ffbe51e1c9c33c82ab19213a76b0af5418dac60408f06b44f5f4a4

See more details on using hashes here.

File details

Details for the file duden-0.17.0-py3-none-any.whl.

File metadata

  • Download URL: duden-0.17.0-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for duden-0.17.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad5d5cb32daec4e8f567c2ed59780c80bc5b1c2f00f43a6570c4bc364db6158c
MD5 1493b39ebec8e08844e8f4edfd3c5d03
BLAKE2b-256 7948b8f1b2d7485db9f7da40b298c9027c3e2b0514c131e325499b98f8436b3a

See more details on using hashes here.

Supported by

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