ChangeLog
3.26.0
- 【feat】Fixed the inconsistency in return values of
first
inpattern: 'first'
mode andtype: 'all'
: Modify it to consistently return the original non-Chinese characters for non-Chinese inputs. #278
3.25.0
- 【feat】Added
v
option to thematch
API to allow usingv
to matchü
#276
3.24.2
- 【feat】Added
rp
option to thehtml
API to remove<rp>(</rp>
and<rp>)</rp>
from the output #272 - 【feat】When the custom class name in the
html
API is set tofalse
ornull
, the default class name is retained #271
3.24.1
- 【fix】Fixed the issue where the
segment
function would discard the last punctuation mark #268
3.24.0
- 【feat】Added
segment
API for word segmentation #265 - 【feat】Added
nonZhScope
property to thepinyin
API to specify the scope ofnonZh
#266
3.23.1
- patch: Corrected some pronunciations #260
3.23.0
- 【feat】Support for external calls to
getInitialAndFinal
,getFinalParts
,getNumOfTone
, and other APIs #255
3.22.2
- 【fix】Fixed
.d.ts
file errors caused by alias #253
3.22.1
3.22.0
- 【feat】Comprehensive adaptation of all APIs to support double Unicode encoded Chinese characters #242, #243, #247
- 【feat】Support for all characters in the General Standard Chinese Character Table #244
- 【feat】Support for the pronunciation of the repeated character 々 #245
- 【feat】Support for pinyin characters like
êê̄ếê̌ề
#248 - 【patch】Correct the default pronunciation of
曲
: #249
3.21.1
- 【fix】Fixed the issue where
surname: 'head'
did not work for compound surnames
3.21.0
- 【feat】Added a
surname
option to thepinyin
API, which supports recognizing surnames at the beginning of strings.
3.20.4
- 【fix】Fixed TypeScript type errors caused by alias.
3.20.3
- 【fix】Fixed an issue where the
convert
API incorrectly handled tone conversion for theiu
finals. - 【patch】Corrected pronunciation for certain words, see details in #232.
3.20.2
- 【fix】Addressed inconsistency in conversion behavior of
polyphonic
andpinyin
for non-Chinese characters.
3.20.1
- 【fix】Updated dictionary dependency versions.
3.20.0
- 【feat】Support for customizing dictionaries through the
addDict
API. - 【feat】Added intelligent recognition of tone changes for
一
and不
, which can be controlled by thetoneSandhi
parameter to toggle on and off. Reference: Wikipedia - 【feat】Enhanced pronunciation recognition for
行
,斗
, and重
when preceded by numerical quantifiers. - 【feat】Added intelligent recognition of the pronunciation of
了
at the beginning of words. - 【feat】HTML API now includes the
customClassMap
option to add custom class names to specified characters. - 【feat】Implemented a new word segmentation algorithm, supporting dictionary input for more accurate segmentation.
- 【feat】Added
polyphonic
andinZhRange
properties to theall
mode. - 【fix】Improved efficiency issue when using the
customPinyin
API. - 【fix】Resolved issues when using
multiple
andsurname
modes simultaneously. - 【fix】Addressed the problem in
multiple
mode where a non-Chinese character was lost when only one was present. - 【patch】Corrected the pronunciation of certain words.
3.19.6
3.19.5
- 【fix】Fixed the issue where the first letter was not retrieved correctly in the
pattern: 'first'
mode for non-Chinese characters
3.19.4
- 【fix】Fixed the issue of incorrect conversion of non-Chinese characters under the
toneType: none
parameter. #156
3.19.3
- 【patch】Correct the directory:434cf51cd
3.19.2
【patch】Correct the following words in directory:
diff止咳: 'zhǐ ké', 咳特灵: 'ké tè líng',
止咳: 'zhǐ ké', 咳特灵: 'ké tè líng',
3.19.1
【patch】Correct the following words in directory:
diff那些: 'nèi xiē', 皇上: 'huáng shang', 太监: 'tài jiàn', 审查: 'shěn zhā', 只得: 'zhǐ de', 哪些: 'něi xiē', 一处: 'yī chǔ', 大夫: 'dài fū', 便宜: 'pián yí', 哪个: 'něi gè', 肚子: 'dǔ zi', 难得: 'nán de', 晓得: 'xiǎo de', 寻思: 'xín sī', 夺得: 'duó de', 巴结: 'bā jì', 了得: 'liǎo de', 行家: 'háng jia', 当夜: 'dàng yè', 皇上: 'huáng shàng', 太监: 'tài jian', 审查: 'shěn chá', 大夫: 'dài fu', 便宜: 'pián yi', 难得: 'nán dé', 晓得: 'xiǎo dé', 寻思: 'xún si ', 夺得: 'duó dé', 巴结: 'bā jié', 了得: 'liǎo dé', 行家: 'háng jiā',
那些: 'nèi xiē', 皇上: 'huáng shang', 太监: 'tài jiàn', 审查: 'shěn zhā', 只得: 'zhǐ de', 哪些: 'něi xiē', 一处: 'yī chǔ', 大夫: 'dài fū', 便宜: 'pián yí', 哪个: 'něi gè', 肚子: 'dǔ zi', 难得: 'nán de', 晓得: 'xiǎo de', 寻思: 'xín sī', 夺得: 'duó de', 巴结: 'bā jì', 了得: 'liǎo de', 行家: 'háng jia', 当夜: 'dàng yè', 皇上: 'huáng shàng', 太监: 'tài jian', 审查: 'shěn chá', 大夫: 'dài fu', 便宜: 'pián yi', 难得: 'nán dé', 晓得: 'xiǎo dé', 寻思: 'xún si ', 夺得: 'duó dé', 巴结: 'bā jié', 了得: 'liǎo dé', 行家: 'háng jiā',
3.19.0
- 【Feature】:
customPinyin
:customPinyin
now supports applying tomultiple
andpolyphonic
.
3.18.6
- 【patch】Correct the following words in directory, for more details please see #148
- 【fix】convert: support input
v
, for example:lv4 se4
->lǜ sè
3.18.5
【patch】Correct the following words in directory:
diff否极泰来: 'pǐ jí tài lái', 否往泰来: 'pǐ wǎng tài lái', 否去泰来: 'pǐ qù tài lái', 否极泰回: 'pǐ jí tài huí', 泰来否往: 'tài lái pǐ wǎng', 泰来否极: 'tai lái fǒu jí', 唯唯否否: 'wěi wěi fǒu fǒu', 臧否: 'zāng pǐ', 否泰: 'pǐ tài', 否极泰: 'pǐ jí tài', 泰来否: 'tài lái pǐ',
否极泰来: 'pǐ jí tài lái', 否往泰来: 'pǐ wǎng tài lái', 否去泰来: 'pǐ qù tài lái', 否极泰回: 'pǐ jí tài huí', 泰来否往: 'tài lái pǐ wǎng', 泰来否极: 'tai lái fǒu jí', 唯唯否否: 'wěi wěi fǒu fǒu', 臧否: 'zāng pǐ', 否泰: 'pǐ tài', 否极泰: 'pǐ jí tài', 泰来否: 'tài lái pǐ',
3.18.4
【patch】Correct the following words in directory:
只争朝夕: 'zhǐ zhēng zhāo xī', 娉婷婀娜: 'pīng tíng ē nà', 鸣凤朝阳: 'míng fèng zhāo yáng', 凤鸣朝阳: 'fèng míng zhāo yáng', 朝阳鸣凤: 'zhāo yáng míng fèng', 朝成暮徧: 'cháo chéng mù shí', 朝霞: 'zhāo xiá', 朝夕: 'zhāo xī', 朝气: 'zhāo qì', 翅膀: 'chì bǎng', 省长: 'shěng zhǎng', 一担水: 'yī dàn shuǐ',
只争朝夕: 'zhǐ zhēng zhāo xī', 娉婷婀娜: 'pīng tíng ē nà', 鸣凤朝阳: 'míng fèng zhāo yáng', 凤鸣朝阳: 'fèng míng zhāo yáng', 朝阳鸣凤: 'zhāo yáng míng fèng', 朝成暮徧: 'cháo chéng mù shí', 朝霞: 'zhāo xiá', 朝夕: 'zhāo xī', 朝气: 'zhāo qì', 翅膀: 'chì bǎng', 省长: 'shěng zhǎng', 一担水: 'yī dàn shuǐ',
3.18.3
- 【patch】Correct and add the following words to directory:
- 衒玉贾石:
zuì yù jiǎ shí
->zuì yù gǔ shí
- 了却:
liǎo què
- 力气:
lì qi
- 席子:
xí zi
- 林子:
lín zi
- 衒玉贾石:
3.18.2
- 【patch】Correct and add the following words to directory:
- 瓶子:
shàn zi
->píng zi
- 镜子:
jìng zi
- 银子:
yín zi
- 盘子:
pán zi
- 瓶子:
3.18.1
- 【fix】Fix the issue of build failure in some Vue cli projects caused by bundler migration in
3.18.0
3.18.0
- 【feat】match:An
insensitive
option has been added to set case-insensitive, default value istrue
- 【patch】Add the following words to directory:
- 琵琶:
pí pa
- 蘑菇:
mó gu
- 葫芦:
hú lu
- 狐狸:
hú li
- 桔子:
jú zi
- 盒子:
hé zi
- 桌子:
zhuō zi
- 竹子:
zhú zi
- 师傅:
shī fu
- 衣服:
yī fu
- 袜子:
wà zi
- 杯子:
bēi zi
- 刺猬:
cì wei
- 麦子:
mài zi
- 队伍:
duì wu
- 知了:
zhī liao
- 鱼儿:
yú er
- 馄饨:
hún tun
- 灯笼:
dēng long
- 庄稼:
zhuāng jia
- 聪明:
cōng ming
- 琵琶:
3.17.0
- 【feat】Add
convert
API to convert the format of pinyin
3.16.7
- 【patch】Add the following words to directory:
- 成都:
chéng dū
- 都城:
dū chéng
- 六安:
lù ān
- 蚌埠:
bèng bù
- 崆峒:
kōng tóng
- 都江堰:
dū jiāng yàn
- 成都:
3.16.6
- 【patch】Add the following words to directory:
- 嘴巴: 'zuǐ ba',
- 耳朵: 'ěr duo',
- 茄子: 'qié zi',
3.16.5
- 【patch】Correct pronunciation related to relatives and '子'. For details, please refer to863c2e9
3.16.4
- 【patch】Add the following words to directory:
- 重启:
chóng qǐ
- 重启:
3.16.3
- 【optimize】Optimize the construction time of initializing AC automata
3.16.2
- 【patch】Add following Chinese characters and Pinyin in surname mode:
- 肖:
xiāo
- 肖:
3.16.1
【patch】Correct the Pinyin of following Chinese characters:
- 苹:
pín
->píng
- 苹:
3.16.0
- 【feature】Add parameter
separator
ofpinyin
api to customize separator between pinyins, only effective whentype: 'string'
.
3.15.4
- 【optimize】
esm
eliminates compression confusion and solves the issue of ineffective use of tree shading
3.15.3
- 【fix】 Resolve the issue of retaining alias path in
.d.ts
file
3.15.2
- 【fix】 Optimize the
esm
build format to solve the issue of referencing errors in some node environments
3.15.1
- 【fix】 Fix the
types
references inpackage.json
3.15.0
- 【feat】 Add
html
API to get a HTML string of Chinese characters and Pinyin - 【feat】 Add
polyphonic
API to get all Pinyins of Chinese characters - 【feat】 Rewrite
match
API, add parameter to control matching rules - 【patch】Correct the Pinyin of Some Chinese characters and words:
- 屏:
bīng píng bǐng
->píng bǐng bīng
- 呒:
ḿ
->fǔ ḿ
- 吋:
cùn yīngcùn
->cùn dòu
- 呎:
chǐ yīngchǐ
->chǐ
- 蝊:
uu
->dìng
- 噷:
hm hěn xīn hèn
->xīn hěn hèn
- 唡:
liǎng yīngliǎng
->liǎng
- 曢:
uu
->liǎo
- 呣:
ḿ m̀
->ḿ m̀ móu
- 聁:
uu
->pàn
- 闧:
uu
->tā
- 屗:
uu
->wěi
- 虲:
uu
->xiā
- 屏气吞声:
píng qì tūn shēng
->bǐng qì tūn shēng
- 敛声屏息:
liǎn shēng píng xī
->liǎn shēng bǐng xī
- Remove the following Chinese characters:
- 瓸: 'bǎiwǎ'
- Add the following Chinese words:
- 好好:
hǎo hǎo
- 好好:
- 屏:
3.14.0
- 【refactor】Using Aho–Corasick_algorithm to optimize pinyin matching speed and improve performance by nearly 50 times!
- 【patch】Correct the Pinyin of Some Chinese characters and words:
- 种:
zhòng zhǒng chóng
->zhǒng zhòng chóng
- Remove unnecessary Chinese words related to
种(zhǒng)
- Add the following Chinese words:
- 耕种:
gēng zhòng
- 种地:
zhòng dì
- 种菜:
zhòng cài
- 栽种:
zāi zhòng
- 接种:
jiē zhòng
- 垦种:
kěn zhòng
- 种殖:
zhòng zhí
- 种瓜:
zhòng guā
- 种豆:
zhòng dòu
- 种树:
zhòng shù
- 睡着:
shuì zháo
- 笼子:
lóng zi
- 厦门:
xià mén
- 东莞:
dōng guǎn
- 耕种:
- 种:
3.13.2
- 【patch】Correct the Pinyin of Some Chinese characters and words:
- 皇甫:
huáng pǔ
->huáng fǔ
- 一丁点儿:
yī dīng diǎnr
->yī dīng diǎn er
- 皇甫:
3.13.1
- 【fix】pinyin:Fix conflicts when using both
multiple
andname
in theoptions
parameter - 【patch】Correct the Pinyin of Some Chinese characters and words
3.13.0
- 【fix】pinyin:Fix the issue of duplicate pinyin when using
multiple: true
andtoneType: none
simultaneously in theoptions
parameter
3.12.0
- 【feat】pinyin:
options.pattern
parameter adds optional valuesfinalHead
、finalBody
andfinalTail
. - 【feat】pinyin:
options.type
parameter adds optional valueall
to get all the data of Pinyin - 【fix】pinyin:Fix the issue of incorrect output results when the
text
parameter contains spaces andoptions.type
isarray
3.11.0
- 【perf】Optimize the Pinyin vocabulary to improve the accuracy
- 【perf】Reduce the size of package by approximately 10%
- 【feat】match:New support for Chinese matching and mixed Chinese and Pinyin matching
3.10.2
- 【patch】Correct the Pinyin of Some Chinese characters and words:
- 责:
zhài
->zé zhài
- 朝阳:
zhāo cháo yáng
->cháo yáng
- 假发:
jiǎ fā
->jiǎ fà
- 责:
- 【perf】Optimize prompts of typescript
3.10.1
- 【patch】Correct the Pinyin of Some Chinese characters and words:
- 哼:
hng
->hēng hng
- 哼:
3.10.0
- 【perf】Reduce the size of package by approximately 30%
3.9.0
- 【feat】pinyin:The
options
parameter adds an optional attribute ofv
. Whenoptions.v
istrue
, theü
in Pinyin will ebe replaced byv
.
3.8.3
- 【patch】Correct the Pinyin of Some Chinese characters and words:
- 查岗:
zhā gǎng
->chá gǎng
- 查核:
zhā hé
->chá hé
- 查缉:
zhā jī
->chá jī
- 查检:
zhā jiǎn
->chá jiǎn
- 查看:
zhā kàn
->chá kàn
- 查勤:
zhā qín
->chá qín
- 查帐:
zhā zhàng
->chá zhàng
- 查照:
zhā zhào
->chá zhào
- 查岗:
3.8.2
- 【fix】pinyin:Fix again the issue of incorrect default values returned by double byte unicode encoded text
3.8.1
- 【fix】pinyin:Fix the issue of incorrect default values returned by double byte unicode encoded text
3.8.0
- 【feat】pinyin:The
options
parameter adds an optional attributenonZh
to configure the output for non Chinese Characters.
3.7.2
- 【patch】Correct the Pinyin of Some Chinese characters and words:
- 物美价廉:
jià lián wù měi
->wù měi jià lián
- 物美价廉:
3.7.1
- 【fix】pinyin:Fix the issue of pinyin conversion errors when
options.toneType
isnone
for嗯
3.7.0
- 【perf】Support for dynamic introduction of ESM
3.6.2
- 【fix】pinyin:Fix the issue of not prioritizing matching custom pinyin when using both the
customPinyin
API andoptions.mode
issurname
simultaneously. - 【fix】pinyin:Fix the issue of incorrect pinyin for some surnames.
3.6.1
- 【fix】pinyin:Fix memory overflow when
options.removeNonZh
istrue
and all input strings are non Chinese Characters.
3.6.0
- 【feat】pinyin:The
options
parameter adds an optional attribute ofremoveNonZh
, whenoptions.removeNonZh
istrue
, output of non Chinese characters will be removed.
3.5.0
- 【feat】Add the
match
API to support pinyin text matching.
3.4.1
- 【fix】pinyin:Fix the issue of invalid tone acquisition when
options.toneType
isnum
andoptions.pattern
isfirst
oroptions.pattern
isinitial
.
3.4.0
- 【feat】pinyin:The
options
parameter adds an optional attributemode
. Whenoptions.mode
issurname
, support Pinyin recognition with surname pattern. - 【feat】Add
customPinyin
api,Support user customize pinyin. - 【fix】Fix memory overflow issue when text is too long.
- 【patch】Correct the Pinyin of Some Chinese characters and words:
- 褚:
zhǔ
->chǔ zhǔ
- 俞:
yù
->yú yù
- 臧:
zàng
->zāng
- 贲:
bì
->bēn bì
- 莘:
xīn
->shēn xīn
- 郦:
zhí
->lì zhí
- 褚:
3.3.1
- 【fix】Fix memory overflow issue when text is too long.
3.3.0
- 【perf】Optimize the pinyin conversion speed, it has increased by nearly 30 times!
3.2.3
- 【perf】Optimize prompts of typescript.
- 【perf】Optimize pinyin conversion algorithm to improve conversion speed.
3.2.2
- 【fix】pinyin:Fix the error issue of not finding polyphonic results when options is
{ multiple: true, type: 'array ' }
3.2.1
- 【patch】Correct the Pinyin of Some Chinese characters and words:
- 艾:
yì
->ài yì
- 吽:
ōu
->hōng hǒu ōu
- 艾:
3.2.0
- 【perf】Adjust the dictionary order based on the frequency of single word usage to improve performance, and increase the conversion speed of long sentences by 100%.
- 【patch】Correct the Pinyin of Some Chinese characters and words:
- 啊:
ā
->a
- 阿:
ē
->ā
- 啊:
- 【perf】Support the use of
<script />
3.1.0
- 【feat】pinyin:
options.pattern
adds an optional valuefirst
to get the first character of Pinyin. - 【docs】Fix the typo in Readme.
3.0.7
- 【perf】Remove the readme option from
package.json
3.0.6
- 【docs】Fix version update document link error in Readme
3.0.5
- 【docs】Optimize the QR code size of
README.md
documents
3.0.4
- 【docs】
README.md
add QR Code
3.0.3
- 【lint】Add
eslintrc
specification code quality.
3.0.2
- 【perf】Optimize npm package quality and
README.md
3.0.1
- 【fix】Fix issue with no
index.d.ts
3.0.0
- 【refactor】Refactored the project using typescript + rollup