{"id":20688753,"url":"https://github.com/71/oktjs","last_synced_at":"2025-04-22T15:42:29.738Z","repository":{"id":50336811,"uuid":"518369194","full_name":"71/oktjs","owner":"71","description":"Open Korean Text transpiled to JavaScript.","archived":false,"fork":false,"pushed_at":"2023-09-13T14:19:07.000Z","size":36,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T13:16:08.906Z","etag":null,"topics":["browser","javascript","korean","korean-nlp","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/71.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-27T08:17:36.000Z","updated_at":"2025-03-06T03:28:31.000Z","dependencies_parsed_at":"2024-11-16T23:06:55.105Z","dependency_job_id":"f65e50d6-f669-4b68-9c55-974867771c49","html_url":"https://github.com/71/oktjs","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"4d054fb5062e305c24726d647658b52e0dc68eaa"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/71%2Foktjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/71%2Foktjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/71%2Foktjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/71%2Foktjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/71","download_url":"https://codeload.github.com/71/oktjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250269954,"owners_count":21402970,"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":["browser","javascript","korean","korean-nlp","nodejs","typescript"],"created_at":"2024-11-16T23:06:52.026Z","updated_at":"2025-04-22T15:42:29.714Z","avatar_url":"https://github.com/71.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oktjs\n\n\u003ca href=\"https://www.npmjs.com/package/oktjs\" alt=\"npm\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/oktjs\" /\u003e\n\u003c/a\u003e\n\nPort of [Open Korean Text](https://github.com/open-korean-text/open-korean-text)\nto JavaScript; it has no external dependencies, and runs in the browser.\n\nNote that a modern browser with support for\n[ES2018 RegExp unicode escapes](https://caniuse.com/mdn-javascript_builtins_regexp_property_escapes)\nis [necessary](https://www.scala-js.org/doc/regular-expressions.html).\n\n[Try it online](https://observablehq.com/@71/korean-nlp)!\n\n## Building\n\nTo build Oktjs, the following must be installed:\n\n- A JDK.\n- [`sbt`](https://www.scala-sbt.org/) to compile the Scala code.\n- [`yarn`](https://yarnpkg.com/) to fetch dependencies and bundle the JavaScript\n  code.\n\nThen, `yarn` can be used:\n\n```bash\n$ yarn build\n```\n\n## Details\n\nOktjs uses [Scala.js](https://www.scala-js.org/) to compile Open Korean Text to\nJavaScript, so it is cloned as a submodule to use its sources. A few changes are\nrequired to make it work with JavaScript:\n\n- [`open-korean-text/src/main/scala/org/openkoreantext/processor/util/KoreanDictionaryProvider.scala`](open-korean-text/src/main/scala/org/openkoreantext/processor/util/KoreanDictionaryProvider.scala)\n  is replaced by\n  [a shim](src/main/scala/org/openkoreantext/processor/util/KoreanDictionaryProviderShim.scala).\n  - The shim uses [`resources.js`](resources.js) instead of embedded resources\n    to load dictionaries.\n  - `resources.js` embeds `resources.json.gz` using\n    [`esbuild`](https://esbuild.github.io/content-types/#binary).\n  - `resources.json.gz` is generated by\n    [`resources.json.gz.build.js`](resources.json.gz.build.js), which reads\n    resources in\n    [`open-korean-text/src/main/resources/org/openkoreantext/processor/util`](open-korean-text/src/main/resources/org/openkoreantext/processor/util)\n    and writes them to a JSON file, which is then gzipped.\n- [A minimal shim](src/main/scala/com/twitter/Regex.scala) of\n  [Twitter Text](https://github.com/twitter/twitter-text) is provided.\n- [A minimal shim](src/main/scala/org/openkoreantext/processor/util/CharArraySet.scala)\n  of `CharArraySet` is provided.\n- A Scala.js wrapper for the Open Korean Text API is written in\n  [`Okt.scala`](src/main/scala/is/gregoirege/oktjs/Okt.scala) and then\n  re-exported with types by [`index.ts`](index.ts).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F71%2Foktjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F71%2Foktjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F71%2Foktjs/lists"}