GithubHelp home page GithubHelp logo

evidentsolutions / opensearch-analysis-raudikko Goto Github PK

View Code? Open in Web Editor NEW
1.0 7.0 0.0 86 KB

Finnish language analysis for OpenSearch using Raudikko

License: GNU General Public License v3.0

Kotlin 5.03% Dockerfile 1.70% Java 93.26%

opensearch-analysis-raudikko's Introduction

Raudikko Analysis for OpenSearch

The Raudikko Analysis plugin provides Finnish language analysis using Raudikko.

Supported versions

Plugin version Raudikko version OpenSearch version
0.1.0 0.1.4 2.5.0, 2.6.0, 2.7.0, 2.8.0, 2.9.0

The plugin should support all 2.x.x, but OpenSearch requires the plugin to declare an exact version, so each release of the plugin has several packages per OpenSearch version. Check releases if the version you need is included, and if not, please create an issue requesting support for that version.

Installing

To install the plugin, run the following command, changing the version in URL to match your version of OpenSearch:

bin/opensearch-plugin install https://github.com/EvidentSolutions/opensearch-analysis-raudikko/releases/download/v0.1.0/opensearch-analysis-raudikko-0.1.0-os2.9.0.zip

Docker

Building the plugin and running with docker

./gradlew build -DopensearchVersion=2.9.0
cd etc
docker compose build --build-arg "OS_VERSION=2.9.0"
docker compose up

OpenSearch should be running and available at port 9200.

Verify installation

After installing the plugin, you can quickly verify that it works by executing:

curl -XGET 'localhost:9200/_analyze' -H 'Content-Type: application/json' -d '
{
  "tokenizer" : "finnish",
  "filter" : [{"type": "raudikko"}],
  "text" : "Testataan raudikon analyysiä tällä tavalla yksinkertaisesti."
}'

If this works without error messages, you can proceed to configure the plugin index.

Configuring

Include finnish tokenizer and raudikko filter in your analyzer, for example:

{
  "index": {
    "analysis": {
      "analyzer": {
        "default": {
          "tokenizer": "finnish",
          "filter": ["lowercase", "raudikkoFilter"]
        }
      },
      "filter": {
        "raudikkoFilter": {
          "type": "raudikko"
        }
      }
    }
  }
}

You can use the following filter options to customize the behaviour of the filter:

Parameter Default value Description
analyzeAll true Use all analysis possibilities or just the first
splitCompoundWords false Split analysed compound words to its parts
minimumWordSize 3 minimum length of words to analyze
maximumWordSize 100 maximum length of words to analyze
analysisCacheSize 1024 number of analysis results to cache

License and copyright

Copyright (C) 2021-2023 Evident Solutions Oy

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.