3 KiB
BaseX webapp of the electronic HEDO
This repository contains the webapp files to be used with BaseX running as a webapp, plus some scripts to convert between different XML representations.
Original code written by Oleg Belyaev in 2024–2025.
A public version of this database is currently available here.
Installation
In order to recreate the server setup, you have to make the following steps:
-
Install BaseX. Make sure that Saxon is in your classpath (the open source HE will do). This can be done either directly through the environment variable CLASSPATH, or by putting Saxon's JAR files (all of them, including those in
lib/
) intobasex/lib/custom
. -
Put the content of this repo into the
basex/webapp
directory. -
Create databases called
abaevdict
,abaevdict_en
,abaevdict_ru
,abaevdict_index
. Their roles are as follows:abaevdict
contains the bilingual XML files of the dictionary encoded in the Abaev TEI format. These generally come from the abaev-xml repo.abaevdict_en
andabaevdict_ru
contain the preprocessed, standardized English and Russian XML editions of HEDO. This is done because maintaining a single bilingual database is impractical: users will want to interact with the English and Russian versions only. At some point, they may even diverge. For basic linking, entry IDs should suffice.abaevdict_index
includes various helper documents that are not directly displayed, but used for faster lookup, and for REST API queries.
-
Import the contents of the
entries
folder of abaev-xml into the dbabaevdict
, and the filebiblio/abaev_biblio.xml
into the dbabaevdict_index
. Do not import them as subdirectories/collections; just put them under the database root. -
Execute the script
scripts/update-indices.bxs
from the GUI or CLI. This does the following things:- optimizes
abaevdict
; - imports language data from the CSV file;
- creates the lookup table for entries;
- generates the English and Russian XML in
abaevdict_en
andabaevdict_ru
(most resource-heavy and time-consuming); - generates the HTML, so that it doesn't have to be done on-the-fly in most cases;
- optimizes
abaevdict_en
,abaevdict_ru
; - creates the indices for foreign-languages mentioned words in
abaevdict_index
; - optimizes
abaevdict_index
.
Full execution of these actions takes a while, but it doesn't need to be redone unless the database changes; in the latter case, you can get away with regenerating only individual entries, although this has to be done manually for now
- optimizes
-
Run the BaseX http server (
basexhttp
). It will provide all services athttp://localhost:8080
by default.