Chinese to Pinyin

Support Chinese character (both Simplified and Tranditional) to most popular Pinyin systems, including Hanyu Pinyin, Tongyong Pinyin, Wade-Giles, MPS2, Yale and Gwoyeu Romatzyh. Support multiple pronounciations and customized output.

License

License

BSD
GroupId

GroupId

com.belerweb
ArtifactId

ArtifactId

pinyin4j
Last Version

Last Version

2.5.1
Release Date

Release Date

Type

Type

jar
Description

Description

Chinese to Pinyin
Support Chinese character (both Simplified and Tranditional) to most popular Pinyin systems, including Hanyu Pinyin, Tongyong Pinyin, Wade-Giles, MPS2, Yale and Gwoyeu Romatzyh. Support multiple pronounciations and customized output.
Project URL

Project URL

https://github.com/belerweb/pinyin4j
Source Code Management

Source Code Management

https://github.com/belerweb/pinyin4j.git

Download pinyin4j

How to add to project

<!-- https://jarcasting.com/artifacts/com.belerweb/pinyin4j/ -->
<dependency>
    <groupId>com.belerweb</groupId>
    <artifactId>pinyin4j</artifactId>
    <version>2.5.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.belerweb/pinyin4j/
implementation 'com.belerweb:pinyin4j:2.5.1'
// https://jarcasting.com/artifacts/com.belerweb/pinyin4j/
implementation ("com.belerweb:pinyin4j:2.5.1")
'com.belerweb:pinyin4j:jar:2.5.1'
<dependency org="com.belerweb" name="pinyin4j" rev="2.5.1">
  <artifact name="pinyin4j" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.belerweb', module='pinyin4j', version='2.5.1')
)
libraryDependencies += "com.belerweb" % "pinyin4j" % "2.5.1"
[com.belerweb/pinyin4j "2.5.1"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

pinyin4j

A copy of http://sourceforge.net/projects/pinyin4j, then deploy it to maven central repository.

Download

Download the jar via maven:

<dependency>
    <groupId>com.belerweb</groupId>
    <artifactId>pinyin4j</artifactId>
    <version>2.5.0</version>
</dependency>

QQ Group

QQ群:479540440

多音字识别

在pinyin4j的基础上添加了多音字识别,带近一万个多音词,但是这远远不够,所以用户可设置外挂词库

外挂多音词库

用户配置的外挂词库会覆盖系统中相同词的读音,可用于纠错

配置方式很简单,只需要配置路径即可

MultiPinyinConfig.multiPinyinPath="/Users/yiboliu/my_multi_pinyin.txt"

格式同系统的多音词库,如:

吸血鬼日记 (xi1,xue4,gui3,ri4,ji4)

Versions

Version
2.5.1
2.5.0