{"id":16326420,"url":"https://github.com/bluewings/korean-regexp","last_synced_at":"2025-04-04T21:09:29.285Z","repository":{"id":37631513,"uuid":"301417725","full_name":"bluewings/korean-regexp","owner":"bluewings","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-27T00:37:57.000Z","size":116,"stargazers_count":219,"open_issues_count":0,"forks_count":14,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-04-14T10:18:28.437Z","etag":null,"topics":["hangul","korean","regexp"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/bluewings.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2020-10-05T13:27:13.000Z","updated_at":"2024-05-29T02:48:07.601Z","dependencies_parsed_at":"2024-05-29T02:58:19.006Z","dependency_job_id":null,"html_url":"https://github.com/bluewings/korean-regexp","commit_stats":{"total_commits":49,"total_committers":2,"mean_commits":24.5,"dds":0.04081632653061229,"last_synced_commit":"6988a6a511be3923b86a2f0a16297b0ec479c6d9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluewings%2Fkorean-regexp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluewings%2Fkorean-regexp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluewings%2Fkorean-regexp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluewings%2Fkorean-regexp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluewings","download_url":"https://codeload.github.com/bluewings/korean-regexp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249530,"owners_count":20908212,"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":["hangul","korean","regexp"],"created_at":"2024-10-10T23:08:20.274Z","updated_at":"2025-04-04T21:09:29.257Z","avatar_url":"https://github.com/bluewings.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# korean-regexp\n\n[![npm version](https://badge.fury.io/js/korean-regexp.svg)](https://badge.fury.io/js/korean-regexp)\n\n[한글 자동완성을 위한 정규식](https://bluewings.github.io/unobstructed-hangul-regular-expression/) | 영타 ↔ 한타 변환 | 조사 자동 치환 | 자소 분리, 합치기\n\n\u003ca href=\"https://bluewings.github.io/unobstructed-hangul-regular-expression/\"\u003e\u003cimg src='https://user-images.githubusercontent.com/1563202/95799432-989d4600-0d2f-11eb-8f84-de91659090b7.gif'\u003e\u003c/a\u003e\n\n\n### Installation\n\n    npm install korean-regexp\n\n### Usage\n\n```js\nimport {\n  getRegExp,\n  engToKor,\n  korToEng,\n  correctPostpositions,\n  explode,\n  implode,\n  getPhonemes,\n} from 'korean-regexp';\n\n// the process of typing '개울가'\ngetRegExp('ㄱ');  // /[ㄱ가-깋]/i\ngetRegExp('개');  // /[개-갷]/i\ngetRegExp('갱');  // /(갱|개[아-잏])/i\ngetRegExp('개우');  // /개[우-윟]/i\ngetRegExp('개울');  // /개(울|우[라-맇])/i\ngetRegExp('개욹');  // /개(욹|울[가-깋])/i\ngetRegExp('개울가');  // /개울[가-갛]/i\n\ngetRegExp('ㅊㅅ퀴즈');   // /ㅊㅅ퀴[즈-즿]/i\ngetRegExp('ㅊㅅ퀴즈', {  // /^[ㅊ차-칳]\\s*[ㅅ사-싷]\\s*퀴\\s*[즈-즿]$/g\n  initialSearch: true,\n  startsWith: true,\n  endsWith: true,\n  ignoreSpace: true,\n  ignoreCase: false,\n  global: true,\n});\ngetRegExp('ㅊㅅ퀴즈', {  // /[ㅊ차-칳].*[ㅅ사-싷].*퀴.*[즈-즿]/i\n  initialSearch: true,\n  fuzzy: true,\n});\ngetRegExp('한글날', {  // /한글(?:날|나[라-맇])/i\n  nonCaptureGroup: true\n});\n\nengToKor('gksrmfskf');  // 한글날\nengToKor('Rkrenrl, xhdekfr');  // 깍두기, 통닭\n\nkorToEng('ㅗ디ㅣㅐ 재깅!');  // hello world!\nkorToEng('ㅠㅁ차 새 솓 려셕ㄷ');  // back to the future\n\ncorrectPostpositions('전쟁와(과) 평화');  // 전쟁과 평화\ncorrectPostpositions('고양이은(는) 건드리지 마라');  // 고양이는 건드리지 마라\ncorrectPostpositions('\"테스형\"이(가) \"나훈아\"을(를) 만났다');  // \"테스형\"이 \"나훈아\"를 만났다\n\nexplode('한글');                     // ['ㅎ', 'ㅏ', 'ㄴ', 'ㄱ', 'ㅡ', 'ㄹ']\nexplode('한글', { grouped: true });  // [['ㅎ', 'ㅏ', 'ㄴ'], ['ㄱ', 'ㅡ', 'ㄹ']]\n\nimplode('ㅇㅓㅂㅔㄴㅈㅕㅅㅡ ㅇㅐㄴㄷㅡㄱㅔㅇㅣㅁ');  // 어벤져스 앤드게임\nimplode(['ㅂ', 'ㅜ', 'ㄹ', 'ㄷ', 'ㅏ', 'ㄹ', 'ㄱ']);  // 불닭\nimplode([['ㅂ', 'ㅜ', 'ㄹ'], ['ㄷ', 'ㅏ', 'ㄹ', 'ㄱ']]);  // 불닭\n\ngetPhonemes('한');\n// {\n//   initial: 'ㅎ',\n//   medial: 'ㅏ',\n//   finale: 'ㄴ',\n//   initialOffset: 18,\n//   medialOffset: 0,\n//   finaleOffset: 4\n// }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluewings%2Fkorean-regexp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluewings%2Fkorean-regexp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluewings%2Fkorean-regexp/lists"}