Skip to content

Setting a Custom Environment

Eliza Margaretha Illig edited this page Dec 4, 2024 · 1 revision

Kustvakt configurations can be customized and all customized configs should be located at the /data folder including:

Customizing Kustvakt config

Copy the default Kustvakt configuration file (kustvakt.conf or kustvakt-lite.conf, to the data folder at the project directory. Please do not change the name of the file.

Setting Index Directory

Set krill.indexDir in the configuration file to the location of a Krill index (relative path to the jar). By default, Kustvakt uses the sample index located at the root project directory.

krill.indexDir = sample-index

Changing Kustvakt Server Port

Default port

server.port = 8089

Setting Default Foundries

The following properties define the default foundries used for specific layers. Default foundries are used in rewrites to add missing foundries in KoralQueries.

default.foundry.partOfSpeech = tt
default.foundry.lemma = tt
default.foundry.orthography = opennlp
default.foundry.dependency = malt
default.foundry.constituent = corenlp
default.foundry.morphology = marmot
default.foundry.surface = base

Customizing Database config

Copy jdbc.properties to the data folder. Please do not change the filename.

jdbc.database=sqlite
jdbc.driverClassName=org.sqlite.JDBC
jdbc.url=jdbc:sqlite://[data]/[database-name]
jdbc.username=username
jdbc.password=password
jdbc.schemaPath=db/sqlite, db/predefined

jdbc.schemaPath is used for database migration using Flyway and it corresponds to Flyway locations option. By default, the paths are interpreted as classpaths. To point to external directories, use the prefix filesystem, for instance filesystem:sql.

For the test suite, jdbc.schemaPath includes test data defined in /src/main/resources/db/test.

Customizing Spring XML config

Copy the default-config.xml to the data folder.

Query rewrites can be customized in the Spring XML config. See Disabling-Query-Rewrites

Clone this wiki locally