🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

tsing

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsing - npm Package Compare versions

Comparing version
0.0.2
to
0.0.3
+110
postal/chinese2postal.js
module.exports = {
// ---------------------------
// 专有名词
"中华" : "Chunghwa",
"清华" : "Tsinghua",
// ---------------------------
// 地名(与威妥玛拼音一致者未收录在内)
"安徽" : "Anhwei",
"北京" : "Peking",
"重庆" : "Chungking",
"福建" : "Fukien",
"厦门" : "Amoy",
"汕头" : "Swatow",
"甘肃" : "Kansu",
"广东" : "Kwangtung",
"广州" : "Canton",
"潮州" : "Teochew",
"广西" : "Kwangsi",
"贵州" : "Kweichow",
// 河北
"承德" : "Chengteh",
"张家口" : "Kalgan",
// 河南
"郑州" : "Chengchow",
// 黑龙江
"哈尔滨" : "Harbin",
// 湖北
// 湖南
"吉林" : "Kirin",
"江苏" : "Kiangsu",
"南京" : "Nanking",
"苏州" : "Soochow",
"徐州" : "Suchow",
"扬州" : "Yangchow",
"镇江" : "Chinkiang",
"江西" : "Kiangsi",
// 辽宁
"锦州" : "Chinchow",
"内蒙古" : "Inner Mongolia",
"宁夏" : "Ningsia",
"青海" : "Tsinghai",
// 山东
"济南" : "Tsinan",
"青岛" : "Tsingtao",
"山西" : "Shansi",
"陕西" : "Shensi",
// 上海
"松江" : "Sungkiang",
"四川" : "Szechuan",
// 台湾
"金门" : "Quemoy",
"天津" : "Tientsin",
"蓟县" : "Kishien",
"西藏" : "Tibet",
"新疆" : "Sinkiang",
"香港" : "Hongkong",
"九龙" : "Kowloon",
"浙江" : "Chekiang",
"杭州" : "Hangchow",
"台州" : "Taichow",
"温州" : "Yungkia",
// ---------------------------
// 地理名词
"扬子江" : "Yangtze River", // 扬子江,指长江自南京以下的下游部分,也指代整个长江。
"黑龙江" : "Amur River",
// ---------------------------
// 人名
"毛泽东" : "Mao Tse-tung",
"孙逸仙" : "Sun Yet-sen",
"蒋介石" : "Chiang Kai-shek",
"宋庆龄" : "Soong Ching-ling",
"宋美龄" : "Soong May-ling",
}
+4
-0

@@ -22,2 +22,6 @@ #!/usr/bin/env node

if (command) {
if (!noda.inExists(`command/${command}`, true)) {
console.error(`sub command not supported: ${command}`);
process.exit(1);
}
noda.inRequire(`command/${command}`)(argv);

@@ -24,0 +28,0 @@ }

@@ -5,2 +5,7 @@ # tsinghua Change Log

## [0.0.2] - Nov 20, 2017
* Catch the error when invalid sub command name inputed.
* 收录近百个名词的邮政拼音。
## [0.0.1] - 2017-10-28

@@ -7,0 +12,0 @@

+1
-12

@@ -1,12 +0,1 @@

'use strict';
const MODULE_REQUIRE = 1
/* built-in */
/* NPM */
/* in-package */
;
module.exports = '';
'APIs are not available yet.'

@@ -7,3 +7,3 @@ {

"dependencies": {
"noda": "^0.0.1"
"noda": "^0.1.2"
},

@@ -18,3 +18,3 @@ "devDependencies": {

"name": "tsing",
"version": "0.0.2",
"version": "0.0.3",
"main": "index.js",

@@ -21,0 +21,0 @@ "keywords": [

@@ -17,8 +17,12 @@ 'use strict';

function uniform_postal(postal) {
return postal.toLowerCase().replace(' ', '').replace('-', '');
}
function toChinese(postal) {
postal = postal.toLowerCase();
postal = uniform_postal(postal);
let zh = null;
for (let name in chinese2postal) {
if (chinese2postal[name].toLowerCase() == postal) {
if (uniform_postal(chinese2postal[name]) == postal) {
zh = name;

@@ -25,0 +29,0 @@ break;

# tsing
__Help to master romanization systems elder than Hanyu Pinyin__
在我们目前所使用的 *汉语拼音* 之前,汉字拉丁化注音方案可谓五花八门。其中尤以 *威妥玛拼音* 最为系统、也最为知名,此外,*邮政拼音* 则在专有名词(主要是地名)领域影响广泛。本工具旨在帮助大家快速查找不同注音之间的对照关系。
在我们目前所使用的 *汉语拼音* 之前,汉字拉丁化注音方案可谓五花八门。其中尤以 *威妥玛拼音* 最为系统、也最为知名,此外,*邮政拼音* 则在专有名词(主要是地名)领域影响广泛,吸收了大量方言拼音(特别是南方的广东话和客家话)以及其他约定俗成的拼写方法。本工具旨在帮助大家快速查找不同注音之间的对照关系。

@@ -12,3 +12,3 @@ ## Table of contents

* [Examples](#examples)
* [Why tsinghua](#why-tsinghua)
* [Why tsing](#why-tsing)
* [Honorable Dependents](#honorable-dependents)

@@ -40,3 +40,3 @@ * [About](#about)

## Commmands
## Commands

@@ -73,2 +73,3 @@ * __tsing py2wg__

* 维基百科,[威妥瑪拼音](https://zh.wikipedia.org/wiki/威妥瑪拼音)
* 维基百科,[邮政式拼音](https://zh.wikipedia.org/zh-cn/郵政式拼音)
* 维基百科,[邮政式拼音](https://zh.wikipedia.org/zh-cn/郵政式拼音)
* 百度百科,[邮政式拼音](https://baike.baidu.com/item/邮政式拼音)

@@ -387,3 +387,4 @@ {

"zhui" : "chui",
"zhun" : "chun"
"zhun" : "chun",
"zi" : "zi"
}
{
"清华" : "Tsinghua",
"北京" : "Peking",
"南京" : "Nanking",
"广州" : "Canton",
"厦门" : "Amoy",
"青岛" : "Tsingtao"
}