{"id":13509654,"url":"https://github.com/ikeikeikeike/exkanji","last_synced_at":"2025-03-18T03:31:20.505Z","repository":{"id":62429168,"uuid":"50284259","full_name":"ikeikeikeike/exkanji","owner":"ikeikeikeike","description":"A Elixir library for translating between hiragana, katakana, romaji, kanji and sound. It uses Mecab.","archived":false,"fork":false,"pushed_at":"2018-05-13T13:12:47.000Z","size":31,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T06:32:10.426Z","etag":null,"topics":["elixir","mecab"],"latest_commit_sha":null,"homepage":"https://github.com/ikeikeikeike/exkanji","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ikeikeikeike.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-24T11:19:50.000Z","updated_at":"2024-06-23T03:26:22.000Z","dependencies_parsed_at":"2022-11-01T20:07:16.527Z","dependency_job_id":null,"html_url":"https://github.com/ikeikeikeike/exkanji","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikeikeikeike%2Fexkanji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikeikeikeike%2Fexkanji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikeikeikeike%2Fexkanji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikeikeikeike%2Fexkanji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ikeikeikeike","download_url":"https://codeload.github.com/ikeikeikeike/exkanji/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243896644,"owners_count":20365408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","mecab"],"created_at":"2024-08-01T02:01:11.012Z","updated_at":"2025-03-18T03:31:20.213Z","avatar_url":"https://github.com/ikeikeikeike.png","language":"Elixir","funding_links":[],"categories":["Translations and Internationalizations"],"sub_categories":[],"readme":"# Exkanji\n\n[![Build Status](http://img.shields.io/travis/ikeikeikeike/exkanji.svg?style=flat-square)](http://travis-ci.org/ikeikeikeike/exkanji)\n[![Hex version](https://img.shields.io/hexpm/v/exkanji.svg \"Hex version\")](https://hex.pm/packages/exkanji)\n[![Hex downloads](https://img.shields.io/hexpm/dt/exkanji.svg \"Hex downloads\")](https://hex.pm/packages/exkanji)\n[![Inline docs](https://inch-ci.org/github/ikeikeikeike/exkanji.svg)](http://inch-ci.org/github/ikeikeikeike/exkanji)\n[![hex.pm](https://img.shields.io/hexpm/l/ltsv.svg)](https://github.com/ikeikeikeike/exkanji/blob/master/LICENSE)\n\n\nA Elixir library for translating between hiragana, katakana, romaji, kanji and sound. It uses Mecab.\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed as:\n\n  1. Add exkanji to your list of dependencies in `mix.exs`:\n\n  ```elixir\n  def deps do\n    [{:exkanji, \"~\u003e x.x\"}]\n  end\n  ```\n\n  2. Exkanji package needs `nkf` and `mecab` command and it needs to install those in your environment when you don't have those.\n\n  ```zsh\n  $ brew install nkf\n  $ brew install mecab mecab-ipadic\n  ```\n\n# Usage\n\nExkanji provides some convinient functions in Exkanji module through Exkanji.Translator and Exkanji.Mecab.\nThose provided functions are able to translate into hiragana(ひらがな), katakana(カタカナ), romaji(ローマ字) and sound(五十音).\n\nInto hiragana(ひらがな)\n```Elixir\niex(1)\u003e Exkanji.hiragana \"ａ a A ア ｱ ァ ｧ あ ぁ 亜\"\n\"あ あ あ あ あ ぁ ぁ あ ぁ あ\"\niex(2)\u003e Exkanji.hiragana \"平仮名 ひらがな hiragana\"\n\"ひらがな ひらがな ひらがな\"\n```\n\nInto katakana(カタカナ)\n```Elixir\niex(3)\u003e Exkanji.katakana \"ａ a A ア ｱ ァ ｧ あ ぁ 亜\"\n\"ア ア ア ア ア ァ ァ ア ァ ア\"\niex(4)\u003e Exkanji.katakana \"片仮名 かたかな katakana\"\n\"カタカナ カタカナ カタカナ\"\n```\n\nInto romaji(ローマ字)\n```Elixir\niex(5)\u003e Exkanji.romaji \"ａ a A ア ｱ ァ ｧ あ ぁ 亜\"\n\"a a a a a ァ ァ a ァ a\"\niex(6)\u003e Exkanji.romaji \"ローマ字 ろーまじ ローマジ\"\n\"ro-maji ro-maji ro-maji\"\n```\n\nInto sound(五十音)\n```Elixir\niex(7)\u003e Exkanji.sound \"よろしく\"\n\"や\"\niex(8)\u003e Exkanji.sound \"夜露死苦\"\n\"や\"\n```\n\n## As a Morphological Analyzer.\n\nExkanji is capable of detecting Part-of-Speech from text, As a Morphological Analyzer. It uses Mecab.\n\n```Elixir\niex(1)\u003e Exkanji.parse \"エモい\"\n{:ok,\n [%Exkanji.Mecab{base: \"*\", cform: \"*\", ctype: \"*\",\n   feature: \"名詞,一般,*,*,*,*,*\", hiragana: nil, pos: \"名詞\",\n   pos1: \"一般\", pos2: \"*\", pos3: \"*\", pron: nil, read: nil, romaji: nil,\n   surface: \"エモ\"},\n  %Exkanji.Mecab{base: \"いる\", cform: \"一段\", ctype: \"連用形\",\n   feature: \"動詞,自立,*,*,一段,連用形,いる,イ,イ\", hiragana: nil,\n   pos: \"動詞\", pos1: \"自立\", pos2: \"*\", pos3: \"*\", pron: \"イ\",\n   read: \"イ\", romaji: nil, surface: \"い\"}]}\n```\n\nIt also makes to change that sets Mecab's dictionaly into second arguments in Exkanji.parse function.\n\n```Elixir\niex(2)\u003e Exkanji.parse \"エモい\", dict: \"/opt/local/lib/mecab/dic/neologd-utf8\"\n{:ok,\n [%Exkanji.Mecab{base: \"エモい\", cform: \"*\", ctype: \"*\",\n   feature: \"名詞,固有名詞,一般,*,*,*,エモい,エモイ,エモイ\",\n   hiragana: nil, pos: \"名詞\", pos1: \"固有名詞\", pos2: \"一般\",\n   pos3: \"*\", pron: \"エモイ\", read: \"エモイ\", romaji: nil,\n   surface: \"エモい\"}]}\n```\n\n[API Reference](http://hexdocs.pm/exkanji/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikeikeikeike%2Fexkanji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fikeikeikeike%2Fexkanji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikeikeikeike%2Fexkanji/lists"}