/korean-english-interlinear

Korean-English Interlinear Generator Web-App in Python

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

korean-english-interlinear

This page houses the source code for a publicly available Korean-English Interlinear Generator Web-App.

Designed for learning Korean with any text you want, this program generates crude literal/direct/word-for-word English translations underneath Korean text (interlinear) and supplies extra contextual information in clickable pop-up boxes. The literal translation offers insights into the Korean language that full-sentence translation obscures. The generated pages are self-contained files ideal for saving for offline reading. As it uses simple dictionary look-ups, the translations are only possibilities.

It is written in Python, using Flask and GUnicorn on an Debian Linux docker which I've deployed as a GCloud Run app.

I have also written a simple Mecab-ko Python wrapper which may be of use others.

The core program has these dependencies:

  • Mecab-ko--adaptation of Mecab; both engine and dictionary Downloadable here following instructions for install in this script taken from this site However, the extracted necesities here are done by the Dockerfile already.
  • Soylemma
  • hangul-romanize
  • Requires the KEngDic dictionary to be manually loaded into a PostgreSQL database (see shell script)(KEngDic is released under both MPL 2.0 and LGPL 2.0 or later, the latter of which is compatible here--the present repository contains the KEngDic data within the kengdic.db SQLite file for deployment ease, although this is generated originally by the separate migratekengdic-local-sqlite.py script which you should read closely before using yourself if needed).

Credit for the interlinear css to Pat on Stack Exchange, and for inspiration for the colour scheme to Solarized 8. Inspiration for the project came from BibleHub's Greek-English interlinear site which has been a big help to me.

Thanks also to the various other dictionaries and grammar sites I link to, including: