Skip to content

Commit

Permalink
Merge branch 'upgrade'
Browse files Browse the repository at this point in the history
  • Loading branch information
spideyfusion committed May 28, 2017
2 parents 9f2f589 + 608c6d2 commit b56277e
Show file tree
Hide file tree
Showing 16 changed files with 57,411 additions and 216,916 deletions.
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Git repository
.git/

# Source files
src/

# Scripts
script/

# Documentation
*.md
*.txt
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.build/
35 changes: 35 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
sudo: required

language: bash

services:
- docker

env:
- ES_VERSION=5.4
- ES_VERSION=2.4
- ES_VERSION=1.7

before_install:
# Install the latest version of Docker
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) edge"
- sudo apt-get update -qq
- sudo apt-get purge -y docker-engine
- sudo apt-get install -y docker-ce

install:
# Build and package the dictionary before testing
- script/build.sh

# Build the Docker image that we're going to use for testing
- docker build --build-arg ES_VERSION=${ES_VERSION} -t ${TRAVIS_REPO_SLUG} .

before_script: docker run -d -p 127.0.0.1:9200:9200 ${TRAVIS_REPO_SLUG}

script:
# Wait for Elasticsearch to start accepting incoming connections
- wget --retry-connrefused --tries=30 --wait=1 --spider --quiet http://127.0.0.1:9200/

# Start testing!
- script/test.sh
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

## Release v2.0.0

* Added Bash scripts to automate future dictionary building, testing and updating.
* Set up the [Travis CI](https://travis-ci.org/) build server to test dictionary integrations with Elasticsearch 1.7, 2.4 and 5.4 versions.
* The dictionary is now sourced from the [krunose/hr-hunspell](https://github.com/krunose/hr-hunspell) repository.

## Release v1.0.0

* This is the initial release.
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ARG ES_VERSION=latest

FROM elasticsearch:${ES_VERSION}
MAINTAINER Petar Obradović <[email protected]>

COPY .build/package.zip /tmp/package.zip

RUN mkdir -p /usr/share/elasticsearch/config/hunspell/hr_HR && \
unzip -d /usr/share/elasticsearch/config/hunspell/hr_HR /tmp/package.zip && \
rm /tmp/package.zip
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Elasticsearch compatible Hunspell dictionary for Croatian

This dictionary is meant to be used in combination with Elasticsearch's [Hunspell Stemmer](https://www.elastic.co/guide/en/elasticsearch/guide/current/hunspell.html) in order to provide support for searching of Croatian words inside documents. It's based on LibreOffice's [dictionary](https://github.com/LibreOffice/dictionaries/tree/master/hr_HR).
[![Build Status](https://travis-ci.org/spideyfusion/elasticsearch-croatian.svg?branch=master)](https://travis-ci.org/spideyfusion/elasticsearch-croatian)

This dictionary is meant to be used in combination with Elasticsearch's [Hunspell Stemmer](https://www.elastic.co/guide/en/elasticsearch/guide/current/hunspell.html) in order to provide support for searching of Croatian words inside documents. It's based on the [hr-hunspell](https://github.com/krunose/hr-hunspell) project.

## Differences

Expand All @@ -12,14 +14,33 @@ All diacritic letters (č, ć, đ, š, ž) have been substituted with their ASCI

All comments have been omitted from the affix file in order to preserve compatibility with Apache Lucene's dictionary parser.

## Building

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](#installation).

## Installation

* Place all the files from the root of this repository to `./hunspell/hr_HR/` (relative to Elasticsearch's configuration directory, usually `/etc/elasticsearch/`).
* Extract the [downloaded](https://github.com/spideyfusion/elasticsearch-croatian/releases/latest) or [built](#building) ZIP archive contents to `./hunspell/hr_HR/` (relative to Elasticsearch's configuration directory, usually `/etc/elasticsearch/`).
* If Elasticsearch is already running, restart it.

## Testing

To run tests you'll need to have [Docker](https://www.docker.com/) (**17.05+**), [Python](https://www.python.org/) (**3.0+**) and the following tools: `bash`, `cat`, `cut`, `curl`, `head`, `tail`

* [Build](#building) the dictionary.
* Navigate to the root of the repository.
* Build the Docker image with `docker build --build-arg ES_VERSION=latest -t spideyfusion/elasticsearch-croatian .`.
* Start the Docker container with `docker run --rm -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.4**).
## Credits

* Thanks to [Kruno](mailto:kruno.se@gmx.com) for maintaining LibreOffice's dictionary.
* Thanks to [Kruno](https://github.com/krunose) for maintaining the original dictionary.

## License

Expand Down
25 changes: 16 additions & 9 deletions README_hr_HR.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
Husnpellov rječnik za računalnu provjeru pravopisa hrvatskog jezika
# Husnpellov rječnik za računalnu provjeru pravopisa hrvatskog jezika

Ovaj je rječnik nadopuna i nadogradnja rječnika D. L. iz 2003. g. [1]

Language: Croatian (hr HR).
License: LGPL/SISSL license, 2016
Author: k r u n o . s e [ a t ] g m x . c o m (Kruno)
GPL 2.0/LGPL 2.1/MPL 1.1 tri-license

-----

Language: Croatian (hr HR).
License: LGPL/SISSL license, 2003
Author: d e l a c k o [ a t ] l i n u x . h r (Denis Lackovic)
repository: https://www.github.com/krunose/hr-hunspell

-----

[1] http://cvs.linux.hr/spell/
### Autori i doprinositelji ###

Mirko Kos (m i r k o s 9 9 [ a t ] g m a i l . c o m), 2016. - 2017.

-----

Krunoslav Šebetić (k r u n o . s e [ a t ] g m x . c o m), 2014. - 2017.

-----

Denis Lackovic (http://cvs.linux.hr/spell/), 2003.
Loading

0 comments on commit b56277e

Please sign in to comment.