Skip to main content

A CLI tool for generating csv or json files from word dictionaries.

Project description

📘 Dictionary parser

Dictionary parser is a Python CLI tool for processing and exporting dictionary word lists with customizable filters, formats, and casing options.
Perfect for building vocabulary apps, language tools, or educational datasets.

PyPI version Builds and Tests License: MIT


🔧 Features

  • ✅ Filter words by starting letter or letter range (a, a-c, a,c,f)
  • ✅ Export as JSON or CSV
  • ✅ Convert word case: lower, upper, or no change
  • ✅ Output to one file or split by starting letter
  • ✅ Works with local files or download from a URL
  • ✅ Fast and clean CLI powered by Typer
  • ✅ Metadata support: local_index, length
  • ✅ Sort words in the output files
  • ✅ Use local index per letter instead of global index

🚀 Installation

Install via pip:

pip install dictionary-parser

🧪 Quick Usage

dictionary-parser input.txt output/ --letters=a-c --format=csv --case=lower

Arguments:

  • input.txt — your source word list file
  • output/ — directory for saving results

Options:

Option Description
--letters Letter filter: a, a-c, or a,c,f
--format Output format: json (default) or csv
--case Word casing: lower, upper, or nochange (default)
--merge Export all data into one file instead of per-letter files
--metadata Comma-separated list of metadata fields to include: local_index, length
--use-local-index Use local index per letter instead of global index
--sort Sort words in the output files
--help Show help message and exit

🔍 Examples

Only export words starting with A, B, or C in lowercase CSV:

dictionary-parser input.txt output/ --letters=a-c --format=csv --case=lower

Export only A and F in JSON to a single file:

dictionary-parser input.txt output/ --letters=a,f --merge

📂 Directory Structure

dictionary-parser/
├── dictionary-parser/       # Main CLI app folder
├── docs/                       # Docs Folder
├── tests/                      # Pytest unit tests

📚 Documentation

Full documentation available at: https://dictionary-parser.readthedocs.io

🧑‍💻 Contributing

We love contributions! See our CONTRIBUTING.md for how to get started.

📜 License

This project is licensed under the MIT License.

❤️ Credits

Built with Typer and Python.

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

dictionary_parser-0.3.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

dictionary_parser-0.3.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file dictionary_parser-0.3.0.tar.gz.

File metadata

  • Download URL: dictionary_parser-0.3.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dictionary_parser-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f15b1e5215586656787b5b381e148f4fd770fd52761a53d9d46703b14f8f4f8a
MD5 45b5b73a0db5ba4b4b3a1cb63b8f90da
BLAKE2b-256 88ea3d9c91dc759e3cbe4b3313b6d567ab9c04919a93e99fd97f5b9c8d5e6012

See more details on using hashes here.

Provenance

The following attestation bundles were made for dictionary_parser-0.3.0.tar.gz:

Publisher: python-publish.yml on thecasualdev17/dictionary-parser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dictionary_parser-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dictionary_parser-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d81e8fcf86feebe5fd5821715d07dbfdf9857c0e0e755df2d1182a14e50397d
MD5 bcd07fef0da1ed14fefc8d1865ea762a
BLAKE2b-256 3e24cae95f6d14bc490ee9891a3e4617b3fbe1425024542567f1c43c9f9cad0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dictionary_parser-0.3.0-py3-none-any.whl:

Publisher: python-publish.yml on thecasualdev17/dictionary-parser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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