DictionarPy
An extensible offline dictionary application, in the terminal
The dictionary comes prepopulated with a little over 54,000 words and 120,000 definitions available for offline reference. It is also designed to be added to and grow with your lexicon.
Some things you can do:
- Add and remove words, parts of speech, definitions, IPA transcriptions
- Show random words
- Get similar words
- Reference the built-in IPA key
- Search within definitions for a particular string
- Find anagrams of words
Install with uv
uv tool install dictionarpy
Statistics regarding this version's included dictionary
$ dpy -ns
Words: 54224
Definitions: 120077
IPA Transcriptions: 30073
Disk size: 10.75MB
──────────────────────────────────────────
Parts of speech:
preposition │ idiom │ transitive verb
nom │ plural noun │ intransitive verb
article │ nound │ nom masculin commun
abbreviation │ adverb │ ambitransitive
verb │ determiner │ interjection
auxiliary verb │ conjunction
contraction │ definite article
adjective │ adjectif │ abréviation │ nom
masculin │ pronoun │ noun │ verb │ nom
féminin │ phrase │ verbe
transitive/intransitive verb
Examples
-
Add a word/definition to the database
$ dpy -w "my new word" -p "my part of speech" -d "my definition!"
-
Add or update the phonetic/phonemic transcription of a word
$ dictionarpy -w "my new word" -i "/mj nu wɝd/"
-
Show the definitions for a word (use
-nto avoid ansi escape sequences)$ dictionarpy -n "my new word" ┌──────────────────────┐ │ my new word │ │ /mj nu wɝd/ │ ├──────────────────────┤ │ 1. my part of speech │ │ my definition! │ └──────────────────────┘
-
Remove a definition from the database
$ dictionarpy -r 1 "my new word"
-
Remove an entry from the database
$ dictionarpy -R "remove_this_word"
-
Learn a random word!
$ dpy "$(dpy -z)"
For help and additional functionality:
$ dpy -h
usage: dpy [-h] [-n] [-e] [-s] [-0] [-t [N]] [-g [IPA SYMBOL]] [-c]
[-z [PART OF SPEECH]] [-a] [-r INDEX] [-R] [-f STRING]
[-w ADD_WORD] [-p ADD_POS] [-d ADD_DEF] [-i ADD_IPA] [-P N] [-D N]
[-I] [-v]
[word]
Offline dictionary
positional arguments:
word Word to be defined
options:
-h, --help show this help message and exit
-n, --no-ansi Don't use ansi escape sequences
-e, --no-stemming Don't use Porter Stemming on a word if it's not found
-s, --stats Show database statistics
-0, --empty Show words that do not possess definitions
-t, --tail [N] Show last N words added to the database. N=10 if left
empty
-g, --ipa-guide [IPA SYMBOL]
Show ipa guide (empty for all)
-c, --ipa-charts Show ipa charts
-z, --random [PART OF SPEECH]
Return a random word
-a, --anagrams Show anagrams for word
-r, --remove-def INDEX
Remove a definition specified by its index
-R, --remove-word Remove a word
-f, --find-in-defs STRING
Show entries which contain STRING in definitions
-w, --add-word ADD_WORD
Word to add/word to add to
-p, --add-pos ADD_POS
Part of speech to add
-d, --add-def ADD_DEF
Definition to add
-i, --add-ipa ADD_IPA
Pronunciation to add
-P, --show-pos N Only show word's part of speech at Nth index
-D, --show-def N Only show word's definition at Nth index
-I, --show-ipa Only show word's pronunciation
-v, --version Show version
Release files for dictionarpy 2.6.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dictionarpy-2.6.8.tar.gz | 3.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dictionarpy-2.6.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 MB
Release files / dictionarpy-2.6.8.tar.gz
| Download URL | dictionarpy-2.6.8.tar.gz |
|---|---|
| Size | 3.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6c0380de2223edac28178c2d12e8ba1d23665f4584ae9667b045ee148f7a95f
|
|
BLAKE2b-256 checksum How to use checksums |
7242d08865e622a06c318b927b047ecbf83778c233f7dc9e4b78913de812ece0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / dictionarpy-2.6.8-py3-none-any.whl
| Download URL | dictionarpy-2.6.8-py3-none-any.whl |
|---|---|
| Size | 4.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
58a2fe98e04fd21bb219d05c4450553e7fb23b1dd157fd5f88332f63fcb93847
|
|
BLAKE2b-256 checksum How to use checksums |
0fcb5a10a4f5acfefb133f86246043d3569802cd35bf28d182831e95206be3bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|