Git Product home page Git Product logo

Comments (5)

hotoo avatar hotoo commented on May 18, 2024

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

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

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

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

你也可以考虑:

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

from pinyin.

Honghe avatar Honghe commented on May 18, 2024

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

from pinyin.

hotoo avatar hotoo commented on May 18, 2024

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

from pinyin.

Honghe avatar Honghe commented on May 18, 2024

不明白上一条说什么意思。专有名词转换成拼音,存入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.

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

from pinyin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.