Giter Site home page Giter Site logo

houbb / pinyin Goto Github PK

View Code? Open in Web Editor NEW
228.0 228.0 33.0 1.76 MB

The high performance pinyin tool for java.(java 高性能中文转拼音工具。支持同音字。)

Home Page: https://houbb.github.io/opensource/pinyin

License: Apache License 2.0

Batchfile 1.66% Shell 3.27% Java 95.07%
dfa high-performance nlp pinyin pinyin-analysis pinyin-data pinyin-segmentation pinyin4j segment tiny tiny-pinyin tongyinzi

pinyin's Introduction

生态社群

编号 名称 简介 标签
1 sensitive 基于注解的日志脱敏框架,更加优雅的日志打印 工具,日志
2 auto-log 日志自动输出 工具,日志
3 heaven 收集开发中常用的工具类 工具
4 resubmit 防止重复提交框架 工具
5 validator 新一代校验框架 工具
6 rate-limit 渐进式限流工具框架 工具
7 lock 开箱即用分布式锁 工具
8 lombok-ex 编译时注解框架,扩展 lombok 工具
9 csv CSV的读写工具 工具
10 iexcel EXCEL的读写工具,避免OOM 工具
11 leetcode 力扣算法个人学习笔记 学习
12 awesome-metaverse-zh 元宇宙精选 学习
13 rpc 手写rpc框架 学习,中间件
14 mybatis 手写mybatis框架 学习,中间件,ORM
15 hibernate 手写hibernate框架 学习,中间件,ORM
16 jdbc-pool 手写数据库连接池实现 学习,中间件,ORM
17 cache 手写redis框架 学习,中间件
18 mq 手写mq框架 学习,中间件
19 ioc 手写spring ioc框架 学习,中间件
20 mvc 手写spring mvc框架 学习,中间件
21 async 手写线程池异步框架 学习,中间件
22 sisyphus 支持注解的重试框架 学习,中间件
23 sandglass 任务调度时间框架 学习,中间件
24 segment 基于结巴的分词实现 NLP
25 pinyin 高性能中文转拼音工具 NLP
26 opencc4j 中文繁简体转换 NLP
27 word-checker 中英文拼写检测 NLP
28 sensitive-word 敏感词 NLP
29 nlp-hanzi-similar 汉字相似度 NLP
30 word-cloud 好用的词云工具 DOC
31 markdown-toc 为文档生成目录 DOC
32 idoc 项目自动生成文档 DOC
33 data-factory 测试自动生成对象信息 TEST
34 junitperf 性能测试框架,测试报告生成 TEST
35 houbb.github.io 个人博客 学习
36 nginx4j nginx java 版本 WEB 容器
37 minicat 简易版本 tomcat WEB 容器

pinyin's People

Contributors

dependabot[bot] avatar houbb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pinyin's Issues

有的多音字会使用错误读音

我测试了一下 吃重庆火锅 这句话,pinyin4j 给出了正确结果,这个库会把重转换成 zhong4。可能是因为错误的分词?

有些汉字无法转换

如:凤头䴙䴘等。

PinyinHelper.toPinyin("凤头䴙䴘") -> fèng tóu 䴙 䴘
PinyinHelper.toPinyin("黑喉石䳭") -> hēi hóu shí 䳭

拼音转换有误

很感谢您提供了这么好的框架,但是我在生僻字测试的时候发现有个别汉字转换后的拼音有误,比如:叁(sān),转换后的拼音为:cān,希望您看到可以优化一下。

关于一些带ü的拼音

是否有选项可以把ü打出来,好像目前都用的u,试了下pinyin4j也是有部分问题,他在处理“吕”的时候是正常的,但是在处理“句”这种其实是省略两点的ü也是会认为是u。
希望大佬可以处理下

希望加入粤拼方案

有汉字转成粤语拼音的需求(香港语言学学会粤语拼音方案jyutping),目前只是自定义字典的方式去使用,需要自行繁体简体转换,可以的话希望作者大佬加上这个功能!
image

maven直接打包生成jar文件,执行时PinyinToneReverse会报错

猜测是否为生成JAR包后读取不到/pinyin_dict_char.txt文件,后改为lib分离打包的形式后解决
Exception in thread "mainTimerThread" java.lang.ExceptionInInitializerError
at com.github.houbb.pinyin.bs.PinyinBs.(PinyinBs.java:76)
at com.github.houbb.pinyin.bs.PinyinBs.newInstance(PinyinBs.java:90)
at com.github.houbb.pinyin.util.PinyinHelper.(PinyinHelper.java:32)
at com.txht.service.ForecastService.getWeather(ForecastService.java:85)
at com.txht.service.ForecastService.doGrab(ForecastService.java:61)
at com.txht.task.MyTimerTask$workTimerTask.run(MyTimerTask.java:32)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at com.github.houbb.pinyin.support.tone.PinyinToneReverse.(PinyinToneReverse.java:52)
... 8 more

关于首拼模式,自定义是否带空格。

你好,感谢封装,用过几个拼音库,都在不断的学习和尝试换更新的库。
这里提个使用中遇到的问题,FIRST_LETTER首拼模式下,是否可以多传个参数,不自动加空格(或者多一个没空格的枚举)。
这边用来取中文后做模糊匹配,目前调用完toPinYin后,还得replaceAll(" ", "")一次。
感谢

能否给分词加个开关?

现在我是在转拼音之后,手动trim掉空格
但是有些情况,中英文混合,英文单词中间的空格被误trim了
希望可以关掉分词

很好用,效率不错

重复引入依赖错误

主程序里引入了
<heaven.version>0.1.113</heaven.version>

在nlp-common
再次引入了
<heaven.version>0.1.76</heaven.version>

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.