A set of helpful programs to enhance goldendict for immersion learning.
First, install goldendict-ng.
Install gd-tools-git from the AUR.
Ubuntu and Debian users can install the package attached to the latest GitHub release.
wget https://github.com/Ajatt-Tools/gd-tools/releases/latest/download/gd-tools.deb
sudo apt install ./gd-tools.debCompile from source if apt reports an incompatible or unavailable dependency.
The DEB package does not include the optional Mandarin dictionary resources.
If you want to package gd-tools for your distro and know how to do it,
please create a pull request.
Manual installation
This method is not recommended because it's easy to make a mistake during the process and end up with a broken install. If a package for your system isn't available, you should create it first.
- Install Xmake
2.9.3or newer and GCC14.1or newer. - Install
mecab(mecab-gitfrom the AUR). - Ubuntu users also need GCC 14 and libcurl headers:
sudo apt install g++-14 libcurl4-openssl-dev. - Run
./scripts/quickinstall.sh.
Note: You can run ./scripts/quickinstall.sh --local
to install the program locally (to ~/.local/ ).
To uninstall a system-wide manual installation, run ./scripts/quickuninstall.sh.
If you installed with --local or --user, run ./scripts/quickuninstall.sh --local instead.
This removes files installed by the scripts and preserves other files in their directories.
Note: Ubuntu's standard repository may provide an outdated version of Xmake. Install Xmake from the official Xmake PPA instead:
sudo add-apt-repository ppa:xmake-io/xmake
sudo apt update
sudo apt install xmakeOpen GoldenDict, press "Edit" > "Dictionaries" > "Programs" and add the installed executables.
Set type to html.
Command Line: <name of script> --word %GDWORD% --sentence %GDSEARCH%.
Optionally add arguments, such as: gd-mecab --word %GDWORD% --sentence %GDSEARCH% --user-dict <path> --font-size 20px.
These programs are treated as dictionaries and you can add them under "Dictionaries" or "Groups".
This script outputs the sentence with clickable characters and searches for the longest available dictionary entry (from a predefined list) beginning at that character. For deinflection it currently relies on rdricpp. It also provides links of available entries of smaller substrings.
Usage
gd-marisa --word %GDWORD% --sentence %GDSEARCH% --path-to-dic [PATH_TO_DIC_FILE]
The path to the .dic is an optional argument and defaults to /usr/share/gd-tools/marisa_words.dic
Dependencies
marisa-trie. The official Arch Linux package is called marisa, but it's already a dependency of goldendict.
Building an own index from a set of words
If you would like to make changes to found words,
you can also create an own index from a newline-separated list of words (here called keyset.txt):
marisa-build < keyset.txt > keyset.dic
More information at https://www.s-yata.jp/marisa-trie/docs/readme.en.html
This script passes a sentence through mecab in order to make every part of the sentence clickable.
screencast-area-2023-.3.-18_20-56-12.mp4
Dependencies
This script requires MeCab and the IPA dictionary to be installed.
If you are on an Arch Linux system you can simply install the AUR package mecab-ipadic to obtain both.
Command format
Add this script to GoldenDict under "Dictionaries" > "Programs" (format HTML), like this:
gd-mecab --word %GDWORD% --sentence %GDSEARCH%
Optional arguments
--font-size SIZEthe font size to be used, e.g.30px.--user-dict FILEfull path to the user_dic.dic file. This is done automatically if you install via make.
This script shows the top 5 pictures from Bing images for the given search string.
gd-images --word %GDWORD%
This script shows the search string in the KanjiStrokeOrders font.
gd-strokeorder --word %GDWORD%
Font source: https://www.nihilist.org.uk/
Arguments:
--max-len5maximum size of the input string.--font-size10remfont size. It has to be large in order to see the stroke numbers.
How to call:
gd-strokeorder --word %GDWORD%
This script displays the handwritten form of each character
gd-handwritten --word %GDWORD% --font-size 4rem
Bundled font: ArmedLemon.ttf. The original usage terms and an English summary are included in res/ArmedLemon-LICENSE.txt.
How to call:
gd-handwritten --word %GDWORD%
This script shows example sentences from https://massif.la/
gd-massif --word %GDWORD%
This script searches Anki cards in your collection that contain %GDWORD%.
Arguments:
--field-nameNAMEoptional field to limit search to.--deck-nameNAMEoptional deck to limit search to.--show-fieldsVocabKanji,SentKanjioptional comma-separated list of fields to show.
Example invocation:
gd-ankisearch --field-name VocabKanji --show-fields VocabKanji,SentKanji,Image,SentAudio --word %GDWORD%
Usage
gd-translate --sentence %GDSEARCH%
gd-translate --spoiler yes --to fr --sentence %GDSEARCH%
Dependencies
This script requires Argos Translate and the JA -> target language package to be installed.
pipx install argostranslate
argospm install translate-ja_en
argos-translate -f ja --t en "Hello World!"If you can't install argostranslate due to an error, try an older version of python.
pipx install --python /usr/bin/python3.9 argostranslateThis script passes a sentence through mecab in order to make every part of the sentence clickable. It also automatically converts the sentence to traditional characters.
To use gd-mandarin,
you need to install gd-tools by running ./scripts/quickinstall.sh --mandarin.






