Git Product home page Git Product logo

Comments (8)

mozillazg avatar mozillazg commented on August 15, 2024

@aisq2008 感谢反馈。
我这边没法显示这个汉字,能否提供一下它的 Unicode 编码?

from go-pinyin.

aisq2008 avatar aisq2008 commented on August 15, 2024

这里有一个汉字的字典文件,里面好2万个汉字,你可以把这个文件遍历下
https://github.com/haiwen/seahub/blob/master/seahub/convert-utf-8.txt

from go-pinyin.

aisq2008 avatar aisq2008 commented on August 15, 2024

下面是一个例子,用于正则表达式提取汉字和拼音
html = 'ye2,ya1,ya2,ya3'
reg = r'([1-4])'
imgre = re.compile(reg)
imglist1 = re.findall(imgre,html)
print(imglist1)

reg = r'(.)([a-z]+[1-4]{0,1})'
imgre = re.compile(reg)
imglist = re.findall(imgre,html)
print(imglist)
print(imglist[0][0])

from go-pinyin.

mozillazg avatar mozillazg commented on August 15, 2024

@aisq2008 好的。我看看。

请问你标题中指的是下面两个汉字中的 u'\ue863' 这个汉字吗?

>>> ''.decode('utf-8')
u'\ue863'
>>> '䶮'.decode('utf-8')
u'\u4dae'
>>>

U+E863 这个汉字不是 Unicode 标准中的 CJK 汉字,所以才会没有拼音。
通过你的反馈才知道有这一类的汉字,之后会抽空把类似的汉字尽可能的加到拼音库中(如果有拼音的话)。
也欢迎你帮忙列一下类似的汉字或者向 mozillazg/pinyin-data 提交 PR。

参考:

from go-pinyin.

mozillazg avatar mozillazg commented on August 15, 2024

@aisq2008 已经可以获取这个汉字的拼音了。同时更新了几十个 PUA 汉字的拼音数据。

from go-pinyin.

Artoria2e5 avatar Artoria2e5 commented on August 15, 2024

建议把 PUA 汉字另按一个文件存放——Big5 的各种拓展(e.g. HKSCS)也有一组基本上不兼容的 PUA 映射,如果直接像现在这样加基本就是钦点了 GBK……

当然其实把 PUA 的东西直接叫做汉字就已经有钦定的意思了,啊,jIQeH

from go-pinyin.

mozillazg avatar mozillazg commented on August 15, 2024

@Artoria2e5 谢谢你的建议,我先看看你提到的资料。

from go-pinyin.

mozillazg avatar mozillazg commented on August 15, 2024

@Artoria2e5 既然是拼音不就是指的是汉字吗 😂

from go-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.