Django-based web server for the DPD
This project implements a Django-based webserver that allows word lookup and search in the Digital Pāḷi Dictionary (DPD). For the purpose of building the underlying database, the MDict release files of the DPD and the dpd-db are used. An instance is running at http://niyamata.de.
cd dpdwebserver
python3 manage.py makemigrations dict
python3 manage.py migrate dict
cd misc/tools/parse-mdict
python3 readmdict.py -b ../../../db.sqlite3 -x /path/to/dpd-mdict.mdx
db.sqlite3
file will be about 2GB large.dpd.db
according to the instructions in README.md
cd misc/tools/dpd-db-extractor
sample-config.ini
for use in the next command and set the properties:
source_db
to the dpd.db
file the was build in the previous steptarget_db
to the db.sqlite3
file (see above)./dpd-db-extractor.py --config=<config-file-name>
python3 readmdict.py -b ../../../db.sqlite3 -x /path/to/dpd-grammar-mdict.mdx
python3 readmdict.py -b ../../../db.sqlite3 -x /path/to/dpd-deconstructor-mdict.mdx
db.sqlite3
file will be about 4.5 GB large.dpd-grammar-mdict.mdx
and dpd-deconstructor-mdict.mdx
are used to determine which type of supplementary dictionary is being processed based on the presence of the substrings "grammar" and "deconstructor".cd ../../../
python3 manage.py runserver
http://localhost:8000/dict/dpd/search
http://localhost:8000/dict/dpd/lookup/sati
Can be used to build from the MDict version of the DPD
python3 readmdict.py -w dpd-word-list.txt -x /path/to/dpd-mdict.mdx
dpd-word-list.txt
:mkspell pi.utf-8.spl dpd-word-list.txt
pi.utf-8.spl
into ~/.vim/spell
set spell spelllang=en,pi
to have both English and Pāḷi words recognizedThis tool extracts information from the DPD data base to fill additional tables for the the construction-based search, see above.