GithubHelp home page GithubHelp logo

edict_database's Introduction

Goal

Generate Sqlite relational databases from the JMDICT japanese dictionary.

setup

Dart SDK

SQL is generated using scripts written in dart;

Dart packages

Download required packages with

`pub get`

Utils required binaries

bash scripts are in the src directory to download dictionaries with wget and uncompressed them with gunzip.

Generate .db

sqlite3 db files are created and populated using the sqlite3 binary.

sudo apt install sqlite3

run.bash

Bash scripts src/run.bash can be called with arguments

bash run.bash <kanji|expression|help> [arguments]
arguments:
--download         download JMdict (expression) or kanjidic2 (kanji)
--sql [languages]  generate sql from downloaded dictionary.
--init             create db file tables
--populate         populate db file from generated sql
--clean [what]     delete db and/or sql file

Example: Reset previously generated expression database, generate sql for english sense and populate the db:

bash src/run.bash expression --clean --init --sql "eng" --populate
bash src/run.bash kanji --clean --init --sql "en" --populate

Generate sql for selected languages

The src/create_sql_expression.dart and src/create_sql_kanji.dart scripts can be called with arguments to process only some languages.

The languages are in ISO 639-3 format for expression and ISO 639-2 for kanji, for example:

English and French

dart src/expression/create_sql.dart eng fre

English only

dart src/expression/create_sql.dart eng
dart src/kanji/create_sql.dart en

note: run.bash allow to pass language arguments with quotes, for example:

bash src/run.bash expression --sql "eng fre"

Documentation

For more informations onto the database structure and SQL reicips see the Wiki at https://github.com/odrevet/edict_database/wiki

Licencing

The edict_database project is not affiliated with the edict project.

The source code in the src folder is licenced under the MIT license

The generated sql and db files are licenced under the edrdg license, same as the edict dictionary.

Links

http://www.edrdg.org/

Radkfile

JMdict

kanjidict

edict_database's People

Contributors

odrevet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

yonasoft

edict_database's Issues

Missing space in run.bash

On line 72 of run.bash, there needs to be a space before the closing "]" square bracket. Without this space, it is not possible to download JMdict.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.