Comments (5)
由于汉语分词程序不够精细,这个模块并不能提供 100% 正确的转换结果。
正常来说,分词程序应该将 香港特别行政区
切成 香港 特别 行政 区
,然后 pinyin 模块就可以比较准确的转换了。现在只能将所有的专有名词都增加到拼音库,比如 澳门特别行政区
等等。。。
这样下去拼音库会越来越大,越来越慢。
我期待能有一个精细的分词程序能解决这个问题 :) yanyiwu/nodejieba#29
你也可以考虑:
- 预处理,将常用的专有名词进行预处理。
- 使用多音字模式,输出所有的字音,然后按需处理。
from pinyin.
在这个issue贴上了,比较出名的nlpir分词工具,其能精确地把香港特别行政区
分词3个。
pinyin
如何预处理能够这样分词
yanyiwu/nodejieba#29
from pinyin.
预处理的意思是说,你先把期望的专有名词(如 香港特别行政区)替换成目标拼音(如 xiang gang te bie xing zheng qu),再交给 pinyin 处理
from pinyin.
不明白上一条说什么意思。专有名词转换成拼音,存入pinyin
的词库? 没看到文档哪里这说明。还是其它意思?
2015-07-24 14:38 GMT+08:00 闲耘™ [email protected]:
由于汉语分词程序不够精细,这个模块并不能提供 100% 正确的转换结果。
正常来说,分词程序应该将 香港特别行政区 切成 香港 特别 行政 区,然后 pinyin
模块就可以比较准确的转换了。现在只能将所有的专有名词都增加到拼音库,比如 澳门特别行政区 等等。。。这样下去拼音库会越来越大,越来越慢。
我期待能有一个精细的分词程序能解决这个问题 :) yanyiwu/nodejieba#29
yanyiwu/nodejieba#29—
Reply to this email directly or view it on GitHub
#48 (comment).
Honghe
from pinyin.
var han = '香港特别行政区行政长官董建华';
han = han.replace(/香港特别行政区/g, 'xiang gang te bie xing zheng qu');
console.log( pinyin(han) );
from pinyin.
Related Issues (20)
- 有没有全局的segment设置? HOT 4
- 安装3.0.0-alpha.5版本后运行,出现找不到模块`nodejieba`错误 HOT 6
- "繁"字,给出了三个读音[fán, pán, pó],其中 "pán" 是错误的,这个字没有这个读音 HOT 1
- "桔"字,给出了三个读音[jú, jié, xié],其中 "xié" 是错误的,这个字没有这个读音 HOT 1
- Is it possible to make the html ruby code on the top of Chinese word segmentation for sentences?
- dict-ci.js中“英雄辈出”的雄字注音xóng应为xióng
- 使用node导入pinyin这个包的时候为什么会显示模块不存在 HOT 7
- EsModule引用报错 HOT 2
- 在vue3+vuecli情况下build会报错 HOT 5
- vue2引入包后编译报错 HOT 5
- package.json is not node-pre-gyp ready: HOT 2
- web端 "pinyin": "^3.0.0-alpha.4" "踝" 不兼容 HOT 1
- 《》和里面的内容被当成一个字符处理了 HOT 1
- 添加{mode: 'normal'}无效 HOT 4
- 吕姓pinyin怎么处理成LYU HOT 2
- ESM module imports require .js extension HOT 2
- 希望style可以多选 HOT 1
- 如何去除nodejieba依赖,云函数使用不了 HOT 1
- 能否搞一个DOCKER 给个端口 给个API可以直接用? HOT 1
- 能否兼容IE11 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pinyin.