zhoulixiang
7f658c978b
feat: add traditional Chinese character recognition mode
...
Add support for traditional Chinese characters with the `traditional` option.
This includes new `addTraditionalDict` and `getTraditionalDict` APIs,
and integration with pinyin, html, and segment functions.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-18 12:38:30 +08:00
zhoulixiang
d7a33e0041
feat: 支持声母中排除 yw
2025-08-03 11:07:36 +08:00
zhoulixiang
d9d79f70a0
feat: extract common types
2025-08-03 10:54:35 +08:00
zhoulixiang
80861223d0
feat: 支持自定义 ü 要替换为的字符串
2025-02-23 18:39:32 +08:00
zhoulixiang
169ac1a104
fix: 兼容 customPinyin 文字和拼音数量不对齐的问题
2025-02-23 17:45:00 +08:00
zhoulixiang
fa07de93bd
Merge pull request #279 from zh-lx/feature-first-consistent
...
feat: keep consistent for first
2024-11-03 01:38:53 +08:00
zhoulixiang
ff6efb04b4
feat: keep consistent for first
2024-11-03 01:33:03 +08:00
zhoulixiang
7c8069fd7f
test: update test case for first in polyphonic
2024-11-03 00:29:00 +08:00
zh-lx
2e203f0b46
feat: match api 支持 v 转换
2024-09-24 22:19:41 +08:00
zhoulixiang
d4a9933e76
feat: html api 支持不输出 rp 标签
2024-08-03 17:57:26 +08:00
zhoulixiang
0dd48ece11
feat: 优化 html 自定义类名显示
2024-08-03 17:52:59 +08:00
zhoulixiang
180fd277c8
fix: 修复 segment api 文字最后的标点符号丢失问题
2024-07-29 18:56:00 +08:00
zhoulixiang
c806f4d5b2
feat: 增加 nonZhScope 属性
2024-07-28 20:14:57 +08:00
zhoulixiang
2fdbd9aaf2
feat: add segment api
2024-07-28 18:16:26 +08:00
zhoulixiang
5c9f857a3a
test: 补充测试用例
2024-06-30 17:23:04 +08:00
zhoulixiang
7821ea16ff
chore: remove unused code
2024-06-14 15:20:33 +08:00
zhoulixiang
2e93b60636
typo: fix comment
2024-06-14 15:18:15 +08:00
zhoulixiang
2369a70b5e
fix: 修复 .d.ts 文件中 alias 报错问题
2024-06-14 15:17:14 +08:00
zhoulixiang
4dbe9bdab7
feat: 支持特殊拼音字符的转换
2024-06-10 11:17:54 +08:00
zhoulixiang
35932f3cba
feat: 支持叠字符々发音
2024-06-09 12:10:41 +08:00
zhoulixiang
e2d20119f8
feat: 补全通用汉字规范表字符
2024-06-09 06:56:20 +08:00
zhoulixiang
4832bb1fd9
feat: 双 unicode 编码字符适配
2024-06-08 20:56:57 +08:00
zhoulixiang
7ea51e3ec0
feat: custom 和 match api 对于双 unicode 编码字符的适配
2024-06-05 10:51:54 +08:00
zhoulixiang
818642ad95
fix: 修复 surname:head 对于复姓开头不生效的问题
2024-05-30 19:07:14 +08:00
zhoulixiang
b6f1010317
feat: 优化自定义 dict 的逻辑
2024-05-28 19:59:40 +08:00
zh-lx
fc2047bd15
feat: 支持 surname head 模式
2024-05-22 09:26:20 +08:00
zhoulixiang
0754cdc104
fix: "修复 convert 对于 iu 韵母转换不正确的问题"
2024-04-28 08:22:30 +08:00
zhoulixiang
5b1f66e354
fix: 修复 polyphonic 对非中文字符的处理
2024-04-18 10:48:18 +08:00
zhoulixiang
a407fa9205
test: migrate chai to vitest
2024-04-15 14:40:48 +08:00
zhoulixiang
6099675620
test: 完善测试用例
2024-04-15 11:09:22 +08:00
zhoulixiang
ae365238bd
release: 3.20.0
2024-04-11 21:03:08 +08:00
一丝
03bef8e532
fix: pinyin() 方法中只有一个非中文时无法丢失该字符
...
这个 PR 修复了 `html()` 等方法中只有一个非中文字符时丢失该字符的问题。
**Break Change**
`pinyin('a', { type: 'array' })` 将从原来的返回 `[]` 改为返回 `['a']`,与 `type: 'all'` 的行为保持一致。
2024-04-09 01:39:28 +08:00
zhoulixiang
04bcc6757f
Merge remote-tracking branch 'origin/main' into feature-segmentit
2024-04-07 21:04:20 +08:00
zhoulixiang
e67c9790d4
release: 3.20.0-beta.4
2024-04-07 21:01:47 +08:00
zhoulixiang
2fd861fc4d
feat: pinyin all 模式新增 polyphonic 和 inZhRange 属性
2024-03-29 17:22:52 +08:00
一丝
ad4c339198
feat: 增加更多「行 háng」的词语;支持特殊的绕口令
2024-03-28 18:58:21 +08:00
一丝
ad4a9efa87
feat: 支持「一」、「 〇」连用时,「一」为第一声
...
如:二〇一〇年
2024-03-28 18:49:33 +08:00
zhoulixiang
2750c1d12e
Merge pull request #198 from zh-lx/fix-multiple-with-surname
...
fix: 修复 multiple 和 surname 一同使用的情景
2024-03-21 17:14:38 +08:00
zhoulixiang
57302c8754
test: add test case for multiple with surname
2024-03-21 17:14:11 +08:00
zhoulixiang
62fd375528
fix: 修复 multiple 和 surname 同时使用的场景
2024-03-20 09:26:09 +08:00
zhoulixiang
13a9e08402
fix: 修复 multiple 和 surname 一同使用的情景
2024-03-20 09:23:29 +08:00
一丝
0e3cba3d1d
feat: 增加更多难(nàn)的词组,增加了一些姓氏
...
以及:
- 解决「曾经沧/海难/为水」为变成第四声的问题
2024-03-19 21:37:24 +08:00
zhoulixiang
2ede3642bc
Merge branch 'better-yi' of https://github.com/yisibl/pinyin-pro into better-yi
2024-03-19 00:28:42 +08:00
一丝
832ef9097b
fix: 「之一」与「得之一寸光中」的「一寸」冲突
...
- 增加了一月及与月冲突的测试
2024-03-18 23:32:17 +08:00
zhoulixiang
6440276d71
feat: 优化 一 读音
2024-03-18 23:31:30 +08:00
一丝
5cffd3ea96
fix: 「之一」与「得之一寸光中」的「一寸」冲突
2024-03-18 21:01:17 +08:00
一丝
22c9c95595
feat: 支持「一、更」根据上下文改变读音
...
-「风一更」从一声订正为四声
- 同时「一更天」保持一声
2024-03-18 20:34:04 +08:00
一丝
fb1b2e7bf8
feat: 支持「一」字更多不变调的情况
2024-03-18 17:49:53 +08:00
一丝
cfe9ccf012
fix: 「一地」连用时需要变调为二声
...
如:一地鸡毛、洒了一地
此外增加了更多「一」变调相关的测试
2024-03-18 13:19:13 +08:00
一丝
04ebe96bc1
refactor: 变调选项由 inflection 改为 toneSandhi
...
虽然 Tone changes 会更加通俗一些,但是 Wiki 百科说道:
> Tone sandhi is compulsory as long as the environmental conditions that trigger it are met. It is not to be confused with tone changes that are due to derivational or inflectional morphology.
> https://en.wikipedia.org/wiki/Tone_sandhi#What_tone_sandhi_is_and_what_it_is_not
2024-03-18 12:09:40 +08:00