pinyin-pro
Advanced tools
Comparing version 3.23.1 to 3.24.0
{ | ||
"name": "pinyin-pro", | ||
"version": "3.23.1", | ||
"version": "3.24.0", | ||
"description": "准确率和性能最优异的汉字转拼音库。获取中文拼音、韵母、声母、声调、首字母,支持拼音匹配", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
import { SingleWordResult } from "../../common/type"; | ||
import type { SurnameMode } from "../../common/type"; | ||
import { TokenizationAlgorithm } from "../../common/segmentit"; | ||
import { MatchPattern, TokenizationAlgorithm } from "../../common/segmentit"; | ||
/** | ||
@@ -11,3 +11,6 @@ * @description: 获取单个字符的拼音 | ||
export declare const getSingleWordPinyin: GetSingleWordPinyin; | ||
export declare const getPinyin: (word: string, list: SingleWordResult[], surname: SurnameMode, segmentit: TokenizationAlgorithm) => SingleWordResult[]; | ||
export declare const getPinyin: (word: string, list: SingleWordResult[], surname: SurnameMode, segmentit: TokenizationAlgorithm) => { | ||
list: SingleWordResult[]; | ||
matches: MatchPattern[]; | ||
}; | ||
/** | ||
@@ -14,0 +17,0 @@ * @description: 将带音调符号拼音转换为不带音调拼音 |
import { TokenizationAlgorithm } from "../../common/segmentit"; | ||
import type { PinyinMode, SurnameMode } from "../../common/type"; | ||
interface BasicOptions { | ||
export interface BasicOptions { | ||
/** | ||
@@ -56,2 +56,6 @@ * @description 返回的拼音音调类型 | ||
/** | ||
* @description nonZh 生效范围的正则表达式 | ||
*/ | ||
nonZhScope?: RegExp; | ||
/** | ||
* @description 对于 ü 的返回是否转换成 v(仅在 toneType: none 启用时生效) | ||
@@ -89,2 +93,3 @@ * @value false:返回值中保留 ü (默认值) | ||
inZhRange: boolean; | ||
result: string; | ||
} | ||
@@ -91,0 +96,0 @@ interface OptionsReturnString extends BasicOptions { |
import type { SingleWordResult } from "../../common/type"; | ||
import { CompleteOptions } from "./index"; | ||
export declare const validateType: (word: unknown) => boolean; | ||
export declare function isNonZhScope(char: string, scope?: RegExp): boolean; | ||
export declare const middleWareNonZh: (list: SingleWordResult[], options: CompleteOptions) => SingleWordResult[]; | ||
@@ -22,3 +23,4 @@ export declare const middlewareMultiple: (word: string, options: CompleteOptions) => SingleWordResult[] | false; | ||
inZhRange: boolean; | ||
result: string; | ||
}[]; | ||
export declare const middlewareToneSandhi: (list: SingleWordResult[], toneSandhi: boolean) => SingleWordResult[]; |
@@ -9,1 +9,2 @@ export { getInitialAndFinal, getFinalParts, getNumOfTone } from './core/pinyin/handle'; | ||
export { convert } from './core/convert'; | ||
export { segment, OutputFormat } from './core/segment'; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
926115
34
27180