如何利用i和I进入大写数字模式? #816
Replies: 5 comments 1 reply
-
大概可以在 |
Beta Was this translation helpful? Give feedback.
-
我写了一个luna_pinyin_simp_custom.yaml如下: abcnum.dict.yaml如下: name: abcnum 一 1 ================================== 按照这样设置,输入i会提示进入"i mode",但是输入的数字无法转换为汉字是什么问题呢? |
Beta Was this translation helpful? Give feedback.
-
是不是没有生成词典? |
Beta Was this translation helpful? Give feedback.
-
多谢回复,我检查了下,用户词典列表里面有abcnum,但是导出的时候记录却为0,luna_pinyin的导出是正常的。 |
Beta Was this translation helpful? Give feedback.
-
用用户词典而不是固态词典,即词典文件使用 patch:
"engine/segmentors/@before 2": affix_segmentor@abcnum
"engine/translators/@next": script_translator@abcnum
"recognizer/patterns/abcnum": "^i[0-9]*$"
abcnum:
dictionary: ""
user_dict: abcnum
tag: abcnum
prefix: "i"
suffix: "$"
tips: "i mode"
db_class: stabledb
enable_completion: false
enable_sentence: true
initial_quality: 1 我自己用这个办法写了一个临时大写的方案, |
Beta Was this translation helpful? Give feedback.
-
文档里面可以通过自己定义标点来输入单个的中文大写数字
智能abc有两个特殊模式,通过输入i或者I进入,比如:
输入:i1w2q3b4s4
输出:一万二千三百四十四
输入:I1w2q3b4s4
输出:壹万贰仟叁佰肆拾肆
输入:1g2f3y
输出:一个二分三月
在i或者I模式下,数字分别是 一二三四五六七八九○ 和 壹贰叁肆伍陆柒捌玖零,其他字母在此模式也
有特定的输出
不知是否可以通过设置实现以上功能?
Beta Was this translation helpful? Give feedback.
All reactions