{"id":6052,"date":"2022-08-19T15:12:25","date_gmt":"2022-08-19T06:12:25","guid":{"rendered":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=6052"},"modified":"2022-08-20T21:25:40","modified_gmt":"2022-08-20T12:25:40","slug":"korean-nori-analysis-plugin","status":"publish","type":"post","link":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=6052","title":{"rendered":"Korean (nori) Analysis Plugin"},"content":{"rendered":"<h1>Korean (nori) Analysis Plugin<\/h1>\n<p>\ud55c\uae00\uc744 Tokenizing \ud558\uae30 \uc704\ud574 nori Analyser \ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\ub2e4.<\/p>\n<h2>\uc124\uce58<\/h2>\n<pre><code class=\"language-bash\"># install\nsudo bin\/elasticsearch-plugin install analysis-nori\n\n# remove\nsudo bin\/elasticsearch-plugin remove analysis-nori<\/code><\/pre>\n<h2>nori_tokenizer<\/h2>\n<h3>\uc124\uc815<\/h3>\n<ul>\n<li>\n<p>decompound_mode : \ubcf5\ud569\uc5b4 \ucc98\ub9ac\ubc29\uc2dd<\/p>\n<ul>\n<li>\n<p>none : \ubd84\ub9ac\uc548\ud568<\/p>\n<\/li>\n<li>\n<p>discard : \ubd84\ub9ac\uc5b4\ub9cc<\/p>\n<\/li>\n<li>\n<p>mixed : \ubcf5\ud569\uc5b4 + \ubd84\ub9ac\uc5b4 \ubaa8\ub450 \ud3ec\ud568<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>user_dictionary : \uc0ac\uc6a9\uc790 \uc0ac\uc804<\/p>\n<\/li>\n<\/ul>\n<h3>\uc0d8\ud50c<\/h3>\n<p>PUT nori_sample<\/p>\n<pre><code class=\"language-json\">{\n  &quot;settings&quot;: {\n    &quot;index&quot;: {\n      &quot;analysis&quot;: {\n        &quot;tokenizer&quot;: {\n          &quot;nori_user_dict&quot;: {\n            &quot;type&quot;: &quot;nori_tokenizer&quot;,\n            &quot;decompound_mode&quot;: &quot;mixed&quot;,\n            &quot;discard_punctuation&quot;: &quot;false&quot;,\n            &quot;user_dictionary&quot;: &quot;userdict_ko.txt&quot;\n          }\n        },\n        &quot;analyzer&quot;: {\n          &quot;my_analyzer&quot;: {\n            &quot;type&quot;: &quot;custom&quot;,\n            &quot;tokenizer&quot;: &quot;nori_user_dict&quot;\n          }\n        }\n      }\n    }\n  }\n}<\/code><\/pre>\n<p>GET nori_sample\/_analyze<\/p>\n<pre><code class=\"language-json\">{\n  &quot;analyzer&quot;: &quot;my_analyzer&quot;,\n  &quot;text&quot;: &quot;1800\uc0ac\ubb34\uc6a9\ucc45\uc0c1&quot;,\n  &quot;explain&quot;: true\n}<\/code><\/pre>\n<h3>Reload search analyzers API<\/h3>\n<p>\uc0ac\uc804\ud30c\uc77c\uc774 \uc218\uc815\ub418\uc5c8\uc744 \ub54c, search analyzer \ub97c reload \ud574\uc57c \ud569\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-json\">POST \/my-index-000001\/_reload_search_analyzers\nPOST \/my-index-000001\/_cache\/clear?request=true<\/code><\/pre>\n<h2>\uc0ac\uc804\ud30c\uc77c \ubc30\ud3ec\ubc29\uc548<\/h2>\n<h3>Dockerizing<\/h3>\n<p>\ub3c4\ucee4\ub85c Elasticsearch \ub97c \uad00\ub9ac\ud55c\ub2e4\uba74,<br \/>\nDockerizing \ud560 \ub54c \uc0ac\uc804\ud30c\uc77c\uc5d0 \ud3ec\ud568\ud558\ub294 \ubc29\ubc95\uc774 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>\uacf5\uc720 \ud3f4\ub354\uc5d0 \ud30c\uc77c \uc5c5\ub85c\ub4dc<\/h3>\n<h3><del>Custom plugin \ub9cc\ub4e4\uae30<\/del><\/h3>\n<p>Custom plugin \uc5d0\uc11c \ud2b9\uc815 URL \uc5d0\uc11c \ud30c\uc77c\uc744 \ub2e4\uc6b4\ubc1b\uace0,<br \/>\n\uc0ac\uc804\ud30c\uc77c\uc744 \uc5ce\uc5b4\uce58\ub294 \ubc29\uc2dd\uc785\ub2c8\ub2e4.<\/p>\n<p><code>\/home\/elasticsearch\/.java.policy<\/code> \ud30c\uc77c\uc744 \uc0dd\uc131\ud558\uace0,<br \/>\n\uc544\ub798\uc640 \uac19\uc774 \ud30c\uc77c \uc218\uc815\uad8c\ud55c\uc744 \ubd80\uc5ec\ud574\uc57c \ud569\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-policy\">grant {\n    permission java.io.FilePermission &quot;\/tmp\/patient_similarity\/codes.txt&quot;, &quot;read,write&quot;;\n};<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Korean (nori) Analysis Plugin \ud55c\uae00\uc744 Tokenizing \ud558\uae30 \uc704\ud574 nori Analyser \ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\ub2e4. \uc124\uce58 # install sudo bin\/elasticsearch-plugin install analysis-nori # remove sudo bin\/elasticsearch-plugin remove analysis-nori nori_tokenizer \uc124\uc815 decompound_mode : \ubcf5\ud569\uc5b4 \ucc98\ub9ac\ubc29\uc2dd none : \ubd84\ub9ac\uc548\ud568 discard : \ubd84\ub9ac\uc5b4\ub9cc mixed : \ubcf5\ud569\uc5b4 + \ubd84\ub9ac\uc5b4 \ubaa8\ub450 \ud3ec\ud568 user_dictionary : \uc0ac\uc6a9\uc790 \uc0ac\uc804 \uc0d8\ud50c PUT nori_sample { &quot;settings&quot;:\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=6052\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-6052","post","type-post","status-publish","format-standard","hentry","category-elasticsearch"],"_links":{"self":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6052","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6052"}],"version-history":[{"count":6,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6052\/revisions"}],"predecessor-version":[{"id":6085,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6052\/revisions\/6085"}],"wp:attachment":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6052"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}