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)
- 《》和里面的内容被当成一个字符处理了 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
- README.md中存在错字 HOT 1
- 在uniapp中使用报错:Could not resolve "segmentit" imported by "pinyin". Is it installed? HOT 2
- npm上的版本问题 HOT 2
- https://github.com/hotoo/pinyin/tree/gh-pages/dist 这个内容找不到了
- 启用segmentation之后,支持让字/词与拼音的建立关联 HOT 1
- 包的入口文件不存在 HOT 3
- vue3 +ts的项目使用时候 npm i 之后 引用报这个错 HOT 4
- "重启"输出错误 HOT 2
- Next.JS: Module not found: Can't resolve 'pinyin' HOT 2
- 疑似内存泄露? HOT 1
- 莎车 suoche HOT 3
- 官网的文档只有英文与韩文 无法切换中文
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.