{"id":13776591,"url":"https://github.com/keepcosmos/ununiga","last_synced_at":"2025-05-11T10:31:08.097Z","repository":{"id":31523566,"uuid":"35088030","full_name":"keepcosmos/ununiga","owner":"keepcosmos","description":"[은는이가] 한글 조사(助詞) 대응 I18n engine extension","archived":false,"fork":false,"pushed_at":"2024-02-29T05:24:40.000Z","size":29,"stargazers_count":44,"open_issues_count":1,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-27T01:48:15.741Z","etag":null,"topics":["i18n","korean","plugin","rails"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/keepcosmos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-05-05T08:41:51.000Z","updated_at":"2025-02-25T01:37:16.000Z","dependencies_parsed_at":"2024-01-13T11:57:49.004Z","dependency_job_id":"178f2523-e740-49ea-817c-f30dfa4e2aae","html_url":"https://github.com/keepcosmos/ununiga","commit_stats":{"total_commits":23,"total_committers":3,"mean_commits":7.666666666666667,"dds":"0.13043478260869568","last_synced_commit":"004493deeaa2cd7eca7da03636cec32db5effa79"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keepcosmos%2Fununiga","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keepcosmos%2Fununiga/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keepcosmos%2Fununiga/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keepcosmos%2Fununiga/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keepcosmos","download_url":"https://codeload.github.com/keepcosmos/ununiga/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253551615,"owners_count":21926323,"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":["i18n","korean","plugin","rails"],"created_at":"2024-08-03T18:00:29.732Z","updated_at":"2025-05-11T10:31:07.728Z","avatar_url":"https://github.com/keepcosmos.png","language":"Ruby","funding_links":[],"categories":["Programming Languages"],"sub_categories":["Ruby"],"readme":"[![Build Status](https://travis-ci.org/keepcosmos/ununiga.svg?branch=master)](https://travis-ci.org/keepcosmos/ununiga)\n[![Gem Version](https://badge.fury.io/rb/ununiga.svg)](https://badge.fury.io/rb/ununiga)\n\n# ununiga[은는이가]\n\n은는이가는 한글의 자소를 분리하고 적절한 조사를 찾아주는 역할을 합니다.  \nI18n의 Backend 모듈도 제공합니다.\n\n## Installation\n```\ngem install ununiga\n```\n\n### 조사 찾기\n```ruby\nrequire 'ununiga'\n\nUnuniga::JosaPicker.takewell(\"레일즈와(과) 쟝고은(는) 싸우지 않습니다.\")\n# =\u003e \"레일즈와 쟝고는 싸우지 않습니다.\"\nUnuniga::JosaPicker.takewell(\"페이스북(으)로 로그인합니다.\")\n# =\u003e \"페이스북으로 로그인합니다.\"\n\npicker = Ununiga::JosaPicker.new(\"레일즈은(는) 루비을(를) 사용합니다.\")\npicker.takewell\n# =\u003e \"레일즈는 루비를 사용합니다.\n\npicker.josas\n# =\u003e [[3, [\"은\", \"는\"]], [10, [\"을\", \"를\"]]]\n``` \n\n### I18n에 적용하기\n1. Gemfile에 ununiga를 추가합니다. \n```\ngem 'ununiga'\n```\n\n2. Initializer나 environment config파일에 아래 코드를 추가합니다.\n```ruby\nI18n::Backend::Simple.send(:include, Ununiga::I18n::JosaTransformer)\n```\n\n3. 한글 locale yml 파일에 조사를 사용하는 부분을 찾아 '은(는)|(는)은|을(를)...'등으로 조사를 변경합니다.\n```yaml\nlinks:\n  sign_in_with_provider: \"%{provider}(으)로 로그인\"\n\n# Rails의 ActiveModel/ActiveRecord의 Validation을 사용할 경우\nerrors:\n  # 디폴트는 `%{attribute} %{message}`형식으로 띄워쓰기가 되어 있으므로 format을 붙여쓰기로 변경해줍니다.\n  foramt: \"%{attribute}%{message}\"\n  messages:\n    accepted: 을(를) 반드시 확인해야 합니다.\n    equal_to: 은(는) %{count}와(과) 같아야 합니다\n```\n\n### 자소 분리하기\n```ruby\nsplitter = Ununiga::JasoSplitter.new('흯')\nsplitter.chosung       # =\u003e 'ㅎ'\nsplitter.jungsung      # =\u003e 'ㅢ'\nsplitter.jongsung      # =\u003e 'ㄳ'\nsplitter.split         # =\u003e ['ㅎ', 'ㅢ', 'ㄳ']\n```\n\n## Test\n두가지 방식으로 테스트 할 수 있습니다.\n* `rake test` 혹은 그냥 `rake` 커맨드를 사용합니다.\n* 특정 파일을 테스트할 경우 `ruby -Ilib:test /test/{file_name}` 을 사용합니다.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeepcosmos%2Fununiga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeepcosmos%2Fununiga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeepcosmos%2Fununiga/lists"}