Skip to content

Latest commit

 

History

History
119 lines (89 loc) · 6.32 KB

README.md

File metadata and controls

119 lines (89 loc) · 6.32 KB

Jyut Dictionary - A free, open-source, offline Cantonese dictionary

/jyːt ˈdɪkʃənɛɹi/

Look up words from multiple dictionaries in Cantonese or Mandarin, with Traditional Chinese, Simplified Chinese, Jyutping, Pinyin, and English input.

Available for macOS, Windows, and Ubuntu.

Features

Vast number of entries.

Jyut Dictionary gives you access to CEDICT, CC-CANTO, words.hk 粵典, the Unihan database, 開放詞典, and Chinese sentences from Tatoeba, all completely offline. Plus, you can download and add more dictionaries to the program. That's over 200,000 entries and 100,000 sentences to search from!

Search quickly.

Results appear in a list as you type, so it's faster and easier to find what you're looking for. Plus, your search history is saved if you want to go back to a word you've looked up before.

Search with your preferred input method.

Jyut Dictionary supports entry with Traditional Chinese, Simplified Chinese, Jyutping, Pinyin, and English.

Localized.

Use the dictionary in English, French, Simplified and Traditional Cantonese, or Simplified and Traditional Chinese.

Customizable.

Prefer to see only Traditional Chinese? Maybe hide Pinyin? Change the colours of the words or disable them altogether? Do that with a plethora of settings options!

Project structure

The project contains two subdirectories under src: dictionaries, and jyut-dict.

dictionaries

This folder contains several Python3 scripts that convert the various online Cantonese/Written Chinese dictionaries into the dictionary format used by Jyut Dictionary. However, for copyright reasons, data for these sources may not be included in this repository. Selected sources include:

jyut-dict

This folder contains the source code for the program, and a Qt Creator project file. Files are divided into several subdirectories:

  • components: UI components, such as the list view or search bar.
  • dialogs: dialogs, such as the "update available" notification dialog.
  • logic: definitions for search and entry classes, as well as other backend logic.
  • platform: platform-specific files, such as Info.plist for the macOS application bundle.
  • resources: databases, icons, and images.
  • windows: UI windows of the program, such as the main window.

Build and run

This project requires Qt 5.15.

Before building the application, you must provide a dictionary database. Download one from the website, or build the dictionary database using parse-set.py (for CEDICT + CC-CANTO) or parse-individual.py (for CFDICT/HanDeDict).

Place the database, named dict.db, in src/jyut-dict/resources/db/

macOS, Windows: Craft + Qt Creator

  1. Install Craft.
  2. Install various dependencies using Craft:
craft libs/qt/qtmultimedia
craft libs/qt/qtspeech
craft karchive
  1. Set up Qt Creator with a kit from Craft, following instructions here.
  2. Open CMakeLists.txt in Qt Creator, and define CMAKE_CXX_FLAGS as -DPORTABLE -DDEBUG in the CMake configuration if you would like to isolate your debug build from any system files.
  3. Compile and run!

Ubuntu: Manual Git clone + Qt Creator

This guide assumes you have already installed Qt 5.15.2 using the online installer to ~/Qt, with the Qt Multimedia and Qt Speech plugins.

  1. Clone KArchive and check out tags/v5.114.0. This is the last version of KArchive that is compatible with Qt 5.
git clone https://github.com/KDE/karchive.git
cd karchive
git checkout tags/v5.114.0
  1. Build according to KArchive instructions:
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=~/Qt/5.15.2/gcc_64
make
sudo make install
  1. Open CMakeLists.txt in Qt Creator, and define CMAKE_CXX_FLAGS as -DPORTABLE -DDEBUG in the CMake configuration if you would like to isolate your debug build from any system files.
  2. Compile and run!

Packaging for release

See the READMEs for each platform under src/jyut-dict/platform/<platform> for instructions on packaging the built executable.

On the roadmap

See the Github issues and projects for more information!