{"id":23579881,"url":"https://github.com/elixir-unicode/unicode_unihan","last_synced_at":"2025-05-06T18:42:11.033Z","repository":{"id":159157680,"uuid":"634477838","full_name":"elixir-unicode/unicode_unihan","owner":"elixir-unicode","description":"Introspection of the Unicode Unihan database","archived":false,"fork":false,"pushed_at":"2024-06-30T22:30:52.000Z","size":9336,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T01:41:34.520Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elixir-unicode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-04-30T08:54:07.000Z","updated_at":"2024-06-30T22:26:36.000Z","dependencies_parsed_at":"2023-07-23T12:01:19.700Z","dependency_job_id":"be4b5d1d-8321-4e73-a42d-640ce97411e5","html_url":"https://github.com/elixir-unicode/unicode_unihan","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-unicode%2Funicode_unihan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-unicode%2Funicode_unihan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-unicode%2Funicode_unihan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-unicode%2Funicode_unihan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elixir-unicode","download_url":"https://codeload.github.com/elixir-unicode/unicode_unihan/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252746860,"owners_count":21798037,"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":[],"created_at":"2024-12-26T23:13:10.364Z","updated_at":"2025-05-06T18:42:10.980Z","avatar_url":"https://github.com/elixir-unicode.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unicode Unihan\n\n[![Hex Version](https://img.shields.io/hexpm/v/unicode_unihan.svg)](https://hex.pm/packages/unicode_unihan)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/unicode_unihan/)\n[![Download/Week](https://img.shields.io/hexpm/dw/unicode_unihan.svg?)](https://hex.pm/packages/unicode_unihan)\n[![License](https://img.shields.io/hexpm/l/unicode_unihan.svg)](https://hex.pm/packages/unicode_unihan)\n[![Last Updated](https://img.shields.io/github/last-commit/elixir-unicode/unicode_unihan.svg)](https://github.com/elixir-unicode/unicode_unihan/commits/master)\n\nFunctions to return information about Unicode Unihan codepoints.\n\n## Installation\n\nThe package can be installed by adding `:unicode_unihan` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:unicode_unihan, \"~\u003e 0.4\"}\n  ]\nend\n```\n\n### Updating the Unihan database\n\nTwice a year the Unicode consortium releases a new version of the Unicode database. This updated data can then be used in `unicode_unihan` by running the following mix task:\n\n```bash\nmix unicode.unihan.download\n```\n\n## Usage\n\nLookup a character by codespoint in IEx:\n\n```elixir\niex\u003e Unicode.Unihan.unihan(33836)\n%{\n  kTang: %{frequent: true, reading: \"miæ̀n\"},\n  kSBGY: %{position: 37, page: 397},\n  kCantonese: %{\n    final: \"aan\",\n    jyutping: \"maan6\",\n    coda: \"n\",\n    nucleus: \"aa\",\n    onset: \"m\",\n    tone: \"6\"\n  },\n  kCihaiT: %{position: 2, page: 1149, row: 4},\n  kTotalStrokes: %{Hans: 12, Hant: 12},\n  kXerox: \"242:161\",\n  kSimplifiedVariant: 19975,\n  kJapanese: [\"バン\", \"マン\", \"よろず\"],\n  kIICore: %{priority: \"A\", irg: [\"T\", \"J\", \"H\", \"K\", \"M\", \"P\"]},\n  kIRG_JSource: %{source: \"J0\", mapping: \"685F\"},\n  kCNS1992: \"1-655C\",\n  kCNS1986: \"1-655C\",\n  kIRG_VSource: %{source: \"V1\", mapping: \"6538\"},\n  kKorean: \"MAN\",\n  kCowles: 2576,\n  kHangul: %{source: \"0E\", grapheme: \"만\"},\n  kFenn: %{fenn_phonetic: 576, importance: \"C\"},\n  kNelson: 3984,\n  kRSAdobe_Japan1_6: %{\n    code: \"C\",\n    cid: 6408,\n    kangxi: 140,\n    strokes_radical: 3,\n    strokes_residue: 9\n  },\n  kCangjie: [\"T\", \"W\", \"L\", \"B\"],\n  kVietnamese: \"vạn\",\n  kFourCornerCode: %{\n    upper_left: 4,\n    upper_right: 4,\n    lower_left: 4,\n    lower_right: 2,\n    center: 7\n  },\n  kSMSZD2003Readings: \"wàn粵maan6\",\n  kKangXi: %{position: 33, virtual: false, page: 1042},\n  kIRG_KSource: %{source: \"K0\", mapping: \"583F\"},\n  kGSR: %{index: 267, letter: \"a\", prime: \"\"},\n  kMandarin: \"wàn\",\n  kCCCII: \"214F22\",\n  kXHC1983: %{position: 4, entry: 1, page: 1185, reading: \"wàn\"},\n  kJinmeiyoKanji: %{year: 2010, codepoint: 19975},\n  kFennIndex: %{position: 3, page: 593},\n  kHanyuPinyin: %{\n    location: [%{position: 8, virtual: false, page: 53247}],\n    readings: [\"wàn\"]\n  },\n  kHanYu: %{position: 8, virtual: false, page: 3247, volume: 5},\n  kHanyuPinlu: %{reading: \"wàn\", frequency: 1335},\n  kDefinition: [\"ten thousand\", \" innumerable\"],\n  kIRGDaeJaweon: %{position: 6, virtual: false, page: 1501},\n  kIRG_HSource: %{source: \"HB1\", mapping: \"B855\"},\n  kBigFive: {47189, \"\"},\n  kPrimaryNumeric: 10000,\n  kMatthews: %{index: 7030, trailing: \"\"},\n  kMorohashi: %{index: 31339, prime: \"\"},\n  codepoint: 33836,\n  kIRG_GSource: %{source: \"G1\", mapping: [\"4D72\"]},\n  kIRG_KPSource: %{source: \"KP0\", mapping: \"DAC6\"},\n  kDaeJaweon: %{position: 6, virtual: false, page: 1501},\n  kGradeLevel: 4,\n  kTaiwanTelegraph: 5502,\n  kEACC: 2182946,\n  kMojiJoho: [\"MJ022254\", ...],\n  kSemanticVariant: [...],\n  ...\n}\n```\n\nFor more details, see the [guide to Unihan and Unihan introspection](https://raw.githubusercontent.com/elixir-unicode/unicode_unihan/main/docs/unihan_walkthrough.livemd) Livebook, or:\n\n[![Run in Livebook](https://livebook.dev/badge/v1/blue.svg)](https://livebook.dev/run?url=https%3A%2F%2Fraw.githubusercontent.com%2Felixir-unicode%2Funicode_unihan%2Fmain%2Fdocs%2Funihan_walkthrough.livemd)\n\n## Copyright and License\n\nCopyright (c) 2023-2024 Kip Cole ([@kipcole9](https://github.com/kipcole9)) \u0026 Jon Chui ([@jkwchui](https://github.com/jkwchui))\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in\ncompliance with the License. You may obtain a copy of the License at\n\n\u003e https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License\nis distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied. See the License for the specific language governing permissions and limitations under the\nLicense.\n\nThe Unihan Database data files in this repository are governed by the terms of\nthe [Unicode, Inc. License Agreement](https://www.unicode.org/license.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-unicode%2Funicode_unihan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felixir-unicode%2Funicode_unihan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-unicode%2Funicode_unihan/lists"}