{"id":13634939,"url":"https://github.com/compulim/node-opencc","last_synced_at":"2025-04-10T03:32:40.661Z","repository":{"id":57136754,"uuid":"52519602","full_name":"compulim/node-opencc","owner":"compulim","description":"OpenCC implementation for pure Node.js","archived":false,"fork":false,"pushed_at":"2018-04-15T07:51:15.000Z","size":1019,"stargazers_count":59,"open_issues_count":6,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-18T11:22:39.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/compulim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-02-25T11:28:25.000Z","updated_at":"2024-03-12T11:17:21.000Z","dependencies_parsed_at":"2022-09-01T03:00:45.997Z","dependency_job_id":null,"html_url":"https://github.com/compulim/node-opencc","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fnode-opencc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fnode-opencc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fnode-opencc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fnode-opencc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compulim","download_url":"https://codeload.github.com/compulim/node-opencc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223424468,"owners_count":17142744,"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-08-02T00:00:37.927Z","updated_at":"2024-11-06T22:11:55.096Z","avatar_url":"https://github.com/compulim.png","language":"JavaScript","readme":"# Translates between Traditional and Simplified Chinese in pure Node.js [![Build Status](https://travis-ci.org/compulim/node-opencc.svg?branch=master)](https://travis-ci.org/compulim/node-opencc)\n\n(This library use [OpenCC](https://github.com/byvoid/opencc) for its dictionary database and test data)\n\nOpenCC is a translation library for Traditional and Simplified Chinese with dictionary of localized phrases and verbs. But it only runs on Python (or Node.js with Python installed).\n\n`node-opencc` is a brand new project that imports OpenCC database and test case, and translates text without installing any native components.\n\n## Usage\n\n`node-opencc` supports Node.js and modern browsers (with Webpack).\n\n```\nconst opencc = require('node-opencc');\n\nopencc.hongKongToSimplified('滑鼠') === '鼠标';\nopencc.traditionalToHongKong('僞') === '偽';\n```\n\n`node-opencc` supports the following types of translations:\n\n| Function name                   | Translation                               |\n| ------------------------------- | ----------------------------------------- |\n| `hongKongToSimplified`          | Hong Kong to Simplified Chinese           |\n| `simplifiedToHongKong`          | Simplified Chinese to Hong Kong           |\n| `simplifiedToTraditional`       | Simplified Chinese to Traditional Chinese |\n| `simplifiedToTaiwan`            | Simplified Chinese to Taiwan              |\n| `simplifiedToTaiwanWithPhrases` | Simplified Chinese to Taiwan with phrases |\n| `traditionalToHongKong`         | Traditional Chinese to Hong Kong          |\n| `traditionalToSimplified`       | Traditional Chinese to Simplified Chinese |\n| `traditionalToTaiwan`           | Traditional Chinese to Taiwan             |\n| `taiwanToSimplified`            | Taiwan to Simplified Chinese              |\n| `taiwanToSimplifiedWithPhrases` | Taiwan to Simplified Chinese with phrases |\n\n## What's not working\n\nAlthough `node-opencc` tries to redo `OpenCC` with pure JavaScript, there are features that are not working as in `OpenCC`. `node-opencc` currently _do not_ support the following features:\n\n* Multiple alternative phrases, verbs, and characters\n* Use `withPhrases` options\n\n## Changelog\n\nPlease refer to change log [here](CHANGELOG.md).\n\n## Contribution\n\nYou may want to head to [OpenCC](https://github.com/byvoid/opencc) for dictionary contribution.\n\nLove this extension? [Star](https://github.com/compulim/node-opencc/stargazers) us!\n\nWant to make this extension even more awesome? [Send us your wish](https://github.com/compulim/node-opencc/issues/new/).\n\nHate how it is working? [File an issue](https://github.com/compulim/node-opencc/issues/new/) to us.\n\nTo contribute to the code base of `node-opencc`, please file a pull request with unit tests.\n","funding_links":[],"categories":["i18n (国际化)"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompulim%2Fnode-opencc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompulim%2Fnode-opencc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompulim%2Fnode-opencc/lists"}