Coder Social home page Coder Social logo

elasticsearch-analysis-korean's Introduction

Korean Analysis for ElasticSearch 5.0.0-alpha4

The Korean Analysis plugin integrates Lucene Korean analysis module into elasticsearch.

Install plugin

In order to install the plugin, git clone and copy:

sudo cp dist/analysis-korean /usr/share/elasticsearch/plugins/

And restart elasticsearch service:

sudo service elasticsearch restart
...
sudo service elasticsearch status

test elasticseach korean analysis

curl -XDELETE localhost:9200/test

curl -X PUT http://localhost:9200/test -d '{
  "settings": {
      "analysis": {
        "analyzer": {
          "kr_analyzer": {
            "type": "custom",
            "tokenizer": "kr_tokenizer",
            "filter": [ "trim", "kr_filter" ]
          }
        }
      }
  }
}'

curl -XGET 'localhost:9200/test/_analyze?analyzer=kr_analyzer&pretty=1' -d '아버지가 가방에 들어가셨다.'

Result:

{
  "tokens" : [ {
    "token" : "아버지가",
    "start_offset" : 0,
    "end_offset" : 4,
    "type" : "word",
    "position" : 0
  }, {
    "token" : "아버지",
    "start_offset" : 0,
    "end_offset" : 3,
    "type" : "word",
    "position" : 0
  }, {
    "token" : "가방에",
    "start_offset" : 5,
    "end_offset" : 8,
    "type" : "word",
    "position" : 1
  }, {
    "token" : "가방",
    "start_offset" : 5,
    "end_offset" : 7,
    "type" : "word",
    "position" : 1
  }, {
    "token" : "들어가셨다",
    "start_offset" : 9,
    "end_offset" : 14,
    "type" : "word",
    "position" : 2
  } ]
}

The plugin includes the kr_analyzer analyzer, kr_tokenizer tokenizer, and kr_filter token filter.

elasticsearch-analysis-korean's People

Contributors

chanil1218 avatar usemodj avatar xissy avatar

Watchers

 avatar  avatar

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.