Edict SQL

Tagged code, edict, furigana, hiragana, japanese, kanji, reference, sql, yomigana

This is a SQL conversion of the EDICT file from the Electronic Dictionary Research and Development Group at Monash University in MySQL 5 dump format encoded in UTF-8. The file should also work for MySQL 4.1.x. If you have trouble using this file or find an error due to the conversion process please contact me with the details.

By downloading the file below you agree to the terms in the original EDICT license.

Download edict.sql.gz

This file is automatically generated directly from the EDICT file at Monash University unless the local file is less than 10 days old. The source code for this script can be found at here

Usage

The file is encoded in UTF-8.  If you're not sure how to set character sets please see the MySQL user guide.

To import this file into MySQL from Bash:

  1. Extract the file
  2. Create an edict database
  3. Import the data

gunzip edict.sql.gz mysql -u (user) -p -e "CREATE DATABASE edict;" mysql -u (user) -p edict < edict.sql

Note to users of the original edict.sql file on Monash.edu.au:
This improved version will break applications built from the original version.
I'm sorry for the inconvenience but I felt the improvements were justified. Future modifications to the table structure are unlikely.

Changelog since the original table structure:

  • There is no longer a numeric index column because any newly inserted words in the edict file break the key-word relation.
  • Columns have been renamed "japanese", "yomigana", "english".
  • Japanese entries without yomigana are copied to the yomigana field instead of inserting NULL.

All code on this site is free for use at your own risk and provided as-is under the WTFPL license unless otherwise stated. Attribution is appreciated but not required.
Blog content, with the exception of externally quoted material, is licensed under the Creative Commons Attribution 3.0 license