Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(香港特别)行政区 转换结果: hang zheng qu 有误 #48

Closed
Honghe opened this issue Jul 24, 2015 · 5 comments
Closed

(香港特别)行政区 转换结果: hang zheng qu 有误 #48

Honghe opened this issue Jul 24, 2015 · 5 comments

Comments

@Honghe
Copy link

Honghe commented Jul 24, 2015

类似香港特别行政区的这些专有名词词库,作者是建库不完整,还是什么?

@hotoo
Copy link
Owner

hotoo commented Jul 24, 2015

由于汉语分词程序不够精细,这个模块并不能提供 100% 正确的转换结果。

正常来说,分词程序应该将 香港特别行政区 切成 香港 特别 行政 区,然后 pinyin 模块就可以比较准确的转换了。现在只能将所有的专有名词都增加到拼音库,比如 澳门特别行政区 等等。。。

这样下去拼音库会越来越大,越来越慢。

我期待能有一个精细的分词程序能解决这个问题 :) luckykaiyi/nodejieba#29

你也可以考虑:

  • 预处理,将常用的专有名词进行预处理。
  • 使用多音字模式,输出所有的字音,然后按需处理。

@hotoo hotoo closed this as completed Jul 24, 2015
@Honghe
Copy link
Author

Honghe commented Jul 24, 2015

在这个issue贴上了,比较出名的nlpir分词工具,其能精确地把香港特别行政区分词3个。
pinyin如何预处理能够这样分词
luckykaiyi/nodejieba#29

@hotoo
Copy link
Owner

hotoo commented Jul 24, 2015

预处理的意思是说,你先把期望的专有名词(如 香港特别行政区)替换成目标拼音(如 xiang gang te bie xing zheng qu),再交给 pinyin 处理

@Honghe
Copy link
Author

Honghe commented Jul 25, 2015

不明白上一条说什么意思。专有名词转换成拼音,存入pinyin的词库? 没看到文档哪里这说明。还是其它意思?

2015-07-24 14:38 GMT+08:00 闲耘™ notifications@github.com:

由于汉语分词程序不够精细,这个模块并不能提供 100% 正确的转换结果。

正常来说,分词程序应该将 香港特别行政区 切成 香港 特别 行政 区,然后 pinyin
模块就可以比较准确的转换了。现在只能将所有的专有名词都增加到拼音库,比如 澳门特别行政区 等等。。。

这样下去拼音库会越来越大,越来越慢。

我期待能有一个精细的分词程序能解决这个问题 :) luckykaiyi/nodejieba#29
luckykaiyi/nodejieba#29


Reply to this email directly or view it on GitHub
#48 (comment).

Honghe

@hotoo
Copy link
Owner

hotoo commented Jul 25, 2015

var han = '香港特别行政区行政长官董建华';
han = han.replace(/香港特别行政区/g, 'xiang gang te bie xing zheng qu');
console.log( pinyin(han) );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants