This dictionary is meant to be used in combination with Elasticsearch's Hunspell Stemmer in order to provide support for searching of Croatian words inside documents. It's based on the hunspell-hr project.
All diacritic letters (č, ć, đ, š, ž) have been substituted with their ASCII equivalents since native Croatian speakers don't tend to use them at search time.
All comments have been omitted from the affix file in order to preserve compatibility with Apache Lucene's dictionary parser.
Building is currently only supported on Linux platforms. You'll need the following tools: awk
, bash
, cut
, grep
, sed
, wc
, zip
- From the root of the repository run
script/build.sh
. - Grab the
release.zip
archive from the.build
directory and follow the installation instructions.
- Extract the downloaded or built ZIP archive contents to
<path.conf>/hunspell/hr_HR/
. The configuration directory will be at a different location depending on how you installed Elasticsearch. - If Elasticsearch is already running, restart it.
To run tests you'll need to have Docker (17.09+), Python (3.0+) and the following tools: bash
, cat
, cut
, curl
, head
, tail
- Build the dictionary.
- Navigate to the root of the repository.
- Build the Docker image with
docker build -t spideyfusion/elasticsearch-croatian .
. - Start the Docker container with
docker run --rm -e "discovery.type=single-node" -p 9200:9200 spideyfusion/elasticsearch-croatian
. - Run the tests by executing
script/test.sh
.
NOTE: You can specify which version of Elasticsearch you want to build using the
ES_VERSION
build argument (e.g. 5.6.4).
- Thanks to Kruno for maintaining the original dictionary.
See the LICENSE file for license rights and limitations (MIT). The unmodified dictionary license can be found in the README_hr_HR text file.