Skip to content

Commit

Permalink
release: 3.19.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-lx committed Jan 13, 2024
1 parent 9a97a58 commit 425b8ac
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 16 deletions.
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# 更新日志

## 3.19.1

- 【patch】词库修正以下词语

```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ā',
```

## 3.19.0

- 【feat】`customPinyin`: `customPinyin` 支持对 `multiple``polyphonic` 生效
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ npm install pinyin-pro
<td rowspan="2" colspan="2">准确率</td>
<td>😕 Node 版: 97.844%</td>
<td rowspan="2">😕 97.433%</td>
<td rowspan="2">🤩 99.744%</td>
<td rowspan="2">🤩 99.795%</td>
</tr>
<tr>
<td>😕 Web 版: 94.507% </td>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pinyin-pro",
"version": "3.19.0",
"version": "3.19.1",
"description": "准确率和性能最优异的汉字转拼音库。获取中文拼音、韵母、声母、声调、首字母,支持拼音匹配",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down
4 changes: 2 additions & 2 deletions types/common/type.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export interface SingleWordResult {
isZh: boolean;
delete?: boolean;
}
export type ToneType = 'symbol' | 'num' | 'none';
export type PinyinMode = 'normal' | 'surname';
export declare type ToneType = 'symbol' | 'num' | 'none';
export declare type PinyinMode = 'normal' | 'surname';
2 changes: 1 addition & 1 deletion types/core/convert/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type ConvertFormat = 'numToSymbol' | 'symbolToNum' | 'toneNone';
declare type ConvertFormat = 'numToSymbol' | 'symbolToNum' | 'toneNone';
interface ConvertOptions {
/**
* @description 拼音之间的分隔符,默认为空格,convert方法会以该分隔符分割拼音进行转换
Expand Down
4 changes: 2 additions & 2 deletions types/core/custom/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
type CustomHandleType = 'add' | 'replace';
type CustomDictType = 'pinyin' | 'multiple' | 'polyphonic';
declare type CustomHandleType = 'add' | 'replace';
declare type CustomDictType = 'pinyin' | 'multiple' | 'polyphonic';
interface CustomPinyinOptions {
/**
* @description: multiple 对于 customPinyin 补充词汇的处理
Expand Down
2 changes: 1 addition & 1 deletion types/core/html/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ interface HtmlOptions {
* @param {HtmlOptions=} options html 中标签类名相关配置
* @return {string} 带汉字的拼音字符串
*/
export declare const html: (text: string, options?: HtmlOptions) => string;
export declare const html: (text: string, options?: HtmlOptions | undefined) => string;
export {};
2 changes: 1 addition & 1 deletion types/core/match/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ interface MatchOptions {
* @param {MatchOptions=} options 配置项
* @return {Array | null} 若匹配成功,返回 text 中匹配成功的下标数组;若匹配失败,返回 null
*/
export declare const match: (text: string, pinyin: string, options?: MatchOptions) => any;
export declare const match: (text: string, pinyin: string, options?: MatchOptions | undefined) => any;
export {};
14 changes: 7 additions & 7 deletions types/core/pinyin/handle.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ export declare const getPinyin: (word: string, list: SingleWordResult[], mode: '
* @param {string} pinyin
* @return {string}
*/
type GetPinyinWithoutTone = (pinyin: string) => string;
declare type GetPinyinWithoutTone = (pinyin: string) => string;
declare const getPinyinWithoutTone: GetPinyinWithoutTone;
/**
* @description: 获取单字符的多音拼音
* @param {string} word
* @return {WordResult[]}
*/
type GetMultiplePinyin = (word: string, mode?: PinyinMode) => SingleWordResult[];
declare type GetMultiplePinyin = (word: string, mode?: PinyinMode) => SingleWordResult[];
declare const getMultiplePinyin: GetMultiplePinyin;
/**
* @description: 获取拼音的声母和韵母
* @param {string} pinyin
* @return {*}
*/
type GetInitialAndFinal = (pinyin: string) => {
declare type GetInitialAndFinal = (pinyin: string) => {
final: string;
initial: string;
};
Expand All @@ -29,7 +29,7 @@ declare const getInitialAndFinal: GetInitialAndFinal;
* @param {string} pinyin
* @return {*}
*/
type GetFinalParts = (pinyin: string) => {
declare type GetFinalParts = (pinyin: string) => {
head: string;
body: string;
tail: string;
Expand All @@ -40,21 +40,21 @@ declare const getFinalParts: GetFinalParts;
* @param {string} pinyin
* @return {string}
*/
type GetNumOfTone = (pinyin: string) => string;
declare type GetNumOfTone = (pinyin: string) => string;
declare const getNumOfTone: GetNumOfTone;
/**
* @description: 将带音调符号拼音转换为带音调数字拼音
* @param {string} pinyin
* @param {string} originPinyin
* @return {string}
*/
type GetPinyinWithNum = (pinyin: string, originPinyin: string) => string;
declare type GetPinyinWithNum = (pinyin: string, originPinyin: string) => string;
declare const getPinyinWithNum: GetPinyinWithNum;
/**
* @description: 获取拼音的首字母
* @param {string} pinyin
* @return {string}
*/
type GetFirstLetter = (pinyin: string) => string;
declare type GetFirstLetter = (pinyin: string) => string;
declare const getFirstLetter: GetFirstLetter;
export { getPinyinWithoutTone, getInitialAndFinal, getMultiplePinyin, getNumOfTone, getPinyinWithNum, getFirstLetter, getFinalParts, };

0 comments on commit 425b8ac

Please sign in to comment.