BaseX webapp of the electronic HEDO
Find a file
2025-03-21 14:55:49 +03:00
csv initial commit 2025-03-21 14:14:03 +03:00
scripts initial commit 2025-03-21 14:14:03 +03:00
static initial commit 2025-03-21 14:14:03 +03:00
WEB-INF initial commit 2025-03-21 14:14:03 +03:00
xq initial commit 2025-03-21 14:14:03 +03:00
xsl initial commit 2025-03-21 14:14:03 +03:00
LICENSE Initial commit 2025-03-21 14:13:07 +03:00
README.md Add AGPL badge to README 2025-03-21 14:55:49 +03:00

BaseX webapp of the electronic HEDO

AGPL v3

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 20242025.

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:

  1. 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/) into basex/lib/custom.

  2. Put the content of this repo into the basex/webapp directory.

  3. 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 and abaevdict_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.
  4. Import the contents of the entries folder of abaev-xml into the db abaevdict, and the file biblio/abaev_biblio.xml into the db abaevdict_index. Do not import them as subdirectories/collections; just put them under the database root.

  5. 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 and abaevdict_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

  6. Run the BaseX http server (basexhttp). It will provide all services at http://localhost:8080 by default.