JMdict/Edrdg native dictionary for macOS
2021-04-11 / modified at 2023-10-12 / 231 words / 1 mins

JMdict is a freely-available Japanese/English dictionary, I adapted a native macOS dictionary which can be used with force touch.

例:

JMdict with force touch

Downloads

  • Name: JMdict_e
  • Origin license: Creative Commons Attribution-ShareAlike Licence (V4.0) , details
  • My adapted download link: release。The adapted version keeps the same license.

Download, unzip and drag the folder JMdict.dictionary to ~/Library/Dictionaries

How it builds

Internal process for developers only.

Install dependecies

1
2
3
4
5
6
7
8
9
10
# install py
brew install python
# install pyglossary
pip3 install lxml beautifulsoup4
pip3 install pyglossary
# install xcode extras
mkdir -p ~/Developer/Extras/
# download and install, see https://developer.apple.com/download/more/
wget https://download.developer.apple.com/Developer_Tools/Additional_Tools_for_Xcode_12/Additional_Tools_for_Xcode_12.dmg
cp -r '/Volumes/Additional Tools/Utilities/' ~/Developer/Extras

Transform and release

1
2
3
4
5
6
7
8
9
10
11
12
13
14
mkdir ~/tmp && cd ~/tmp
wget -nc http://ftp.edrdg.org/pub/Nihongo/JMdict_e.gz
# JMdict to AppleDictSource, roughly 10 min
pyglossary JMdict_e.gz JMdict --read-format=JMDict --write-format=AppleDict
cd JMdict
# AppleDictSource to AppleDictBin
make
make install
cd ~/Library/Dictionaries
tar zcf JMdict.tar.gz JMdict.dictionary
ver=$(date "+%Y%m%d")
gh release create $(date "+%Y%m%d") \
--notes "adapted from JMDict, version $(date -r ~/tmp/JMdict_e.gz)";
gh release upload $ver ~/Library/Dictionaries/JMdict.tar.gz

JMdict based alternatives

Recommend:

They are all using JMdict as a database