Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Convert the EDICT dictionary format into CSV.

Project Description

edict-to-csv is a set of small command-line utilities for converting EDICT dictionaries into delimited text (CSV). As with many Unix commands, these programs simply read from the standard input and writes to the standard output. Two programs are provided:

  • cedict-to-csv(1)
  • edict1-to-csv(1)

edict1-to-csv converts dictionary entries from the original EDICT1 format used by the JMdict/EDICT project. It does not handle the EDICT2 format or subsequent XML-based formats.

cedict-to-csv converts dictionary entries from the CEDICT project, as used by CC-CEDICT. To use this program, you must have “pinyin-dec” software installed. This will reformat Pinyin entries to use proper diacritics.

CSV entries take the following format:

FORM1|FORM2|TRANSLITERATION|DEFINITION

In the case of EDICT, the second field is always empty. For CEDICT, the second field contains the simplified Chinese form.

The programs included are written as Unix-style command-line utilities. The program modules are also completely accessible through Python so all program functions can be easily called by other programs. The programs are written in Python 3 and are being made available under the MIT License.

Example Usage

You can convert the Japanese EDICT dictionary like this:

$ cat edict.utf8 | edict1-to-csv > edict.csv

If it is compressed and in EUC-JP encoding, you may have to convert it:

$ zcat edict.gz | iconv -f EUC-JP -t UTF-8 | edict1-to-csv > edict.csv

You can convert CC-CEDICT like this:

$ cat cedict.txt | cedict-to-csv > cedict.csv

If you try to use this program without pinyin-dec installed, you will see:

$ cat cedict.txt | cedict-to-csv > cedict.csv
cedict-to-csv: pinyin_dec not available!

Installation

You can install this software the old way with setup.py:

# python3 setup.py install

Or if you have pip installed, that is the better way.

Documentation

This software includes Unix manual pages, which are installed with the program files. By typing “man cedict-to-csv” or “man edict1-to-csv”, you can review the documentation for each program included here.

Release History

Release History

This version
History Node

1.0.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
edict-to-csv-1.0.0.tar.gz (5.6 kB) Copy SHA256 Checksum SHA256 Source Mar 29, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting