# Generate the lookup entries and the English and Russian
# standardized TEI
OPEN abaevdict
OPTIMIZE ALL
# the directory in parse-langnames 
# may be incorrectly determined, check
RUN ../xq/parse-langnames.xq
RUN ../xq/make-lookup.xq
RUN ../xq/gen-lng-entries.xq
CLOSE

# Generate the HTML for faster page generation
RUN ../xq/gen-lng-html.xq

# Optimize the generated databases
OPEN abaevdict_en
OPTIMIZE ALL
CLOSE

OPEN abaevdict_ru
OPTIMIZE ALL
CLOSE

# Create mentioned indices
RUN ../xq/gen-mentioned-index.xq

# Optimize the index database
OPEN abaevdict_index
OPTIMIZE ALL
CLOSE