upgrde cli interface

This commit is contained in:
2026-04-16 19:22:17 +08:00
parent 3ad1a8a12d
commit b4874da108
7 changed files with 363 additions and 10 deletions

View File

@@ -46,7 +46,7 @@ def main():
if v := dictionary.get(word): if v := dictionary.get(word):
if len(v) > 1: if len(v) > 1:
print( print(
f"ERROR: {word} has multiple meanings: \n" f"\nWARNING: {word} has multiple meanings:"
) )
for n, w in enumerate(v): for n, w in enumerate(v):
print(f"{n+1} - {w}") print(f"{n+1} - {w}")
@@ -60,7 +60,9 @@ def main():
v = v[0] v = v[0]
results.append(v) results.append(v)
else: else:
print(f"ERROR: {word} not found") print("============================================")
print(f"===================>ERROR: {word} not found")
print("============================================")
with out_file.open("w", encoding="utf8", newline="") as csvfile: with out_file.open("w", encoding="utf8", newline="") as csvfile:
writer = csv.writer(csvfile, delimiter="\t", quotechar='"') writer = csv.writer(csvfile, delimiter="\t", quotechar='"')

46
data/口语2.tsv Normal file
View File

@@ -0,0 +1,46 @@
"1. to pay a sum of money
2. payment" fù kuǎn 付款 付款
"1. to tie
2. bind or fasten together
3. to kidnap" bǎng 绑 綁
1. interjection indicating approval, appreciation or agreement en 嗯 嗯
"1. information
2. news
3. message" xìn xī 信息 信息
"1. careful; attentive; cautious
2. to be careful; to look out
3. (dialect) thrifty; frugal" zǐ xì 仔细 仔細
1. to pay (money) zhī fù 支付 支付
"1. to catch and hold on
2. to continue
3. to go on to do sth
4. to follow
5. to carry on
6. then
7. after that
8. subsequently
9. to proceed
10. to ensue
11. in turn
12. in one's turn" jiē zhe 接着 接著
"1. angle
2. corner
3. horn
4. horn-shaped
5. unit of money equal to 0.1 yuan, or 10 cents (a dime)
6. CL:個|个[ge4]" jiǎo 角 角
"1. way; method; manner; mode; pattern (of behavior etc)
2. CL:種|种[zhong3]" fāng shì 方式 方式
"1. 2D barcode; matrix code
2. (esp.) QR code" èr wéi mǎ 二维码 二維碼
"1. just in case
2. if by any chance
3. contingency" wàn yī 万一 萬一
1. cash xiàn jīn 现金 現金
"1. additional
2. in addition
3. besides
4. separate
5. other
6. moreover
7. furthermore" lìng wài 另外 另外
1 1. to pay a sum of money 2. payment fù kuǎn 付款 付款
2 1. to tie 2. bind or fasten together 3. to kidnap bǎng
3 1. interjection indicating approval, appreciation or agreement en
4 1. information 2. news 3. message xìn xī 信息 信息
5 1. careful; attentive; cautious 2. to be careful; to look out 3. (dialect) thrifty; frugal zǐ xì 仔细 仔細
6 1. to pay (money) zhī fù 支付 支付
7 1. to catch and hold on 2. to continue 3. to go on to do sth 4. to follow 5. to carry on 6. then 7. after that 8. subsequently 9. to proceed 10. to ensue 11. in turn 12. in one's turn jiē zhe 接着 接著
8 1. angle 2. corner 3. horn 4. horn-shaped 5. unit of money equal to 0.1 yuan, or 10 cents (a dime) 6. CL:個|个[ge4] jiǎo
9 1. way; method; manner; mode; pattern (of behavior etc) 2. CL:種|种[zhong3] fāng shì 方式 方式
10 1. 2D barcode; matrix code 2. (esp.) QR code èr wéi mǎ 二维码 二維碼
11 1. just in case 2. if by any chance 3. contingency wàn yī 万一 萬一
12 1. cash xiàn jīn 现金 現金
13 1. additional 2. in addition 3. besides 4. separate 5. other 6. moreover 7. furthermore lìng wài 另外 另外

13
data/口语2.txt Normal file
View File

@@ -0,0 +1,13 @@
付款
信息
仔细
支付
接着
方式
二维码
万一
现金
另外

View File

@@ -98,12 +98,8 @@
"1. comes at the end of the sentence to indicate a strong degree "1. comes at the end of the sentence to indicate a strong degree
2. quite 2. quite
3. rather" zhe ne 着呢 著呢 3. rather" zhe ne 着呢 著呢
"1. influence "1. impression (sth that stays in one's mind)
2. effect 2. a memory" yìn xiàng 印象 印象
3. to influence
4. to affect (usually adversely)
5. to disturb
6. CL:股[gu3]" yǐng xiǎng 影响 影響
"1. to wish "1. to wish
2. to want 2. to want
3. ready 3. ready
@@ -157,3 +153,58 @@
"1. surname Zhao "1. surname Zhao
2. one of the seven states during the Warring States period (476220 BC) 2. one of the seven states during the Warring States period (476220 BC)
3. the Former Zhao 前趙|前赵[Qian2 Zhao4] (304329) and Later Zhao 後趙|后赵[Hou4 Zhao4] (319350), states of the Sixteen Kingdoms" Zhào 赵 趙 3. the Former Zhao 前趙|前赵[Qian2 Zhao4] (304329) and Later Zhao 後趙|后赵[Hou4 Zhao4] (319350), states of the Sixteen Kingdoms" Zhào 赵 趙
"1. knowledge
2. CL:門|门[men2]
3. intellectual" zhī shi 知识 知識
"1. population
2. people" rén kǒu 人口 人口
1. 100 million yì 亿 億
"1. world
2. CL:個|个[ge4]" shì jiè 世界 世界
"1. country; nation; state
2. CL:個|个[ge4]" guó jiā 国家 國家
"1. area (of a floor, piece of land etc)
2. surface area
3. tract of land" miàn jī 面积 面積
1. kilometer gōng lǐ 公里 公里
"1. to save; to economize; to be frugal
2. to omit; to delete; to leave out
3. province
4. provincial capital
5. a ministry (of the Japanese government)" shěng 省 省
1. autonomous region a provincial-level administrative division of China with self-governance for ethnic minorities (five in total: Guangxi, Inner Mongolia, Ningxia, Xinjiang and Tibet) zì zhì qū 自治区 自治區
"1. municipality, namely: Beijing 北京, Tianjin 天津, Shanghai 上海 and Chongqing 重慶|重庆, the first level administrative subdivision
2. province level city
3. also called directly governed city" zhí xiá shì 直辖市 直轄市
"1. special administrative region (SAR), of which there are two in the PRC: Hong Kong 香港 and Macau 澳門|澳门
2. refers to many different areas during late Qing, foreign occupation, warlord period and Nationalist government
3. refers to special zones in North Korea and Indonesia" tè bié xíng zhèng qū 特别行政区 特別行政區
"1. capital (city)
2. CL:個|个[ge4]" shǒu dū 首都 首都
"1. nationality; ethnic group
2. CL:個|个[ge4]" mín zú 民族 民族
"1. small number
2. few
3. minority" shǎo shù 少数 少數
1. northeast dōng běi 东北 東北
1. air temperature qì wēn 气温 氣溫
"1. that level or lower
2. that amount or less
3. the following" yǐ xià 以下 以下
"1. average; on average
2. evenly; in equal proportions" píng jūn 平均 平均
"1. distance
2. CL:個|个[ge4]
3. to be apart from" jù lí 距离 距離
"1. sun
2. sunlight; sunshine
3. temple (on the side of the human head) (abbr. for 太陽穴|太阳穴[tai4 yang2 xue2])" tài yang 太阳 太陽
1. Europe (abbr. for 歐羅巴洲|欧罗巴洲[Ou1 luo2 ba1 Zhou1]) Ou1 zhōu 欧洲 歐洲
1. Han ethnic group Hàn zú 汉族 漢族
1. Hui Islamic ethnic group living across China Hui2 zú 回族 回族
1. Tibetan ethnic group Zàng zú 藏族 藏族
1. Mongol ethnic group of north China and Inner Mongolia Měng gǔ zú 蒙古族 蒙古族
1. Yangtze River, or Chang Jiang Cháng Jiāng 长江 長江
1. Yellow River or Huang He Huáng Hé 黄河 黃河
1. Heilongjiang Province, capital Harbin 哈爾濱市|哈尔滨市[Ha1 er3 bin1 Shi4] (abbr. to 黑[Hei1]) Hēi lóng jiāng Shěng 黑龙江省 黑龍江省
1. Hainan Island, China's southernmost province, off the coast of Guangdong Hǎi nán Dǎo 海南岛 海南島
1 1. target; object 2. partner; boyfriend; girlfriend 3. CL:個|个[ge4] duì xiàng 对象 對象
98
99
100
101
102
103
104
105
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210

View File

@@ -24,7 +24,7 @@
看来 看来
着呢 着呢
影响 印象
愿意 愿意
原来 原来
经理 经理
@@ -41,3 +41,32 @@
相信 相信
恋爱 恋爱
知识
人口
亿
世界
国家
面积
公里
自治区
直辖市
特别行政区
首都
民族
少数
东北
气温
以下
平均
距离
太阳
欧洲
汉族
回族
藏族
蒙古族
长江
黄河
黑龙江省
海南岛

View File

@@ -0,0 +1,168 @@
"1. gold
2. chemical element Au
3. generic term for lustrous and ductile metals
4. money
5. golden
6. highly respected
7. one of the eight categories of ancient musical instruments 八音[ba1 yin1]" jīn 金 金
"1. necklace
2. CL:條|条[tiao2]" xiàng liàn 项链 項鏈
"1. common
2. ordinary
3. general
4. average" pǔ tōng 普通 普通
"1. worker
2. CL:個|个[ge4],名[ming2]" gōng rén 工人 工人
"1. identical
2. same" xiāng tóng 相同 相同
1. always zǒng shì 总是 總是
1. to get rich fā cái 发财 發財
"1. dream (CL:場|场[chang2],個|个[ge4])
2. (bound form) to dream" mèng 梦 夢
1. to pick up; to collect; to gather jiǎn 捡 撿
"1. purse
2. wallet" qián bāo 钱包 錢包
1. lottery ticket cǎi piào 彩票 彩票
1. to win a prize (in a lottery etc) zhòng jiǎng 中奖 中獎
"1. to touch
2. to meet with
3. to bump" pèng 碰 碰
"1. ordinarily
2. in normal times
3. in peacetime" píng shí 平时 平時
1. sudden; abrupt; unexpected tū rán 突然 突然
"1. to yell
2. to shout
3. to call out for (a person)" hǎn 喊 喊
"1. sound
2. voice
3. tone
4. noise
5. reputation
6. classifier for sounds" shēng 声 聲
1. hastily jí máng 急忙 急忙
"1. to turn
2. to change direction
3. to transfer
4. to forward (mail)
5. (Internet) to share (sb else's content)" zhuǎn 转 轉
1. middle age zhōng nián 中年 中年
1. woman fù nu:3 妇女 婦女
"1. finger
2. to point at or to
3. to indicate or refer to
4. to depend on
5. to count on
6. (of hair) to stand on end" zhǐ 指 指
"1. earth
2. ground
3. field
4. place
5. land
6. CL:片[pian4]" dì 地 地
"1. careful; attentive; cautious
2. to be careful; to look out
3. (dialect) thrifty; frugal" zǐ xì 仔细 仔細
"1. one
2. single
3. a (article)
4. as soon as
5. entire; whole; all; throughout
6. 'one' radical in Chinese characters (Kangxi radical 1)
7. also pr. [yao1] for greater clarity when spelling out numbers digit by digit" yī 一 一
"1. value
2. (to be) worth
3. to happen to
4. to be on duty" zhí 值 值
"1. to rise
2. to raise
3. to get up
4. to set out
5. to start
6. to appear
7. to launch
8. to initiate (action)
9. to draft
10. to establish
11. to get (from a depot or counter)
12. verb suffix, to start
13. starting from (a time, place, price etc)
14. classifier for occurrences or unpredictable events: case, instance
15. classifier for groups: batch, group" qǐ 起 起
"1. to lose
2. to put aside
3. to throw" diū 丢 丟
1. (coll.) if yào shi 要是 要是
1. perhaps; maybe yě xǔ 也许 也許
"1. (after a verb) indicating the beginning and continuation of an action or a state
2. indicating an upward movement (e.g. after 站[zhan4])
3. indicating completion
4. (after a perception verb, e.g. 看[kan4]) expressing preliminary judgment
5. also pr. [qi3lai5]" qi lai 起来 起來
"1. this kind of
2. so
3. this way
4. like this
5. such" zhè yàng 这样 這樣
"1. to divide; to separate
2. to distribute; to allocate
3. to distinguish (good and bad)
4. (bound form) branch of (an organization); sub- (as in 分局[fen1 ju2])
5. fraction
6. one tenth (of certain units)
7. unit of length equivalent to 0.33 cm
8. minute (unit of time)
9. minute (angular measurement unit)
10. a point (in sports or games)
11. 0.01 yuan (unit of money)" fēn 分 分
"1. to fall
2. to drop
3. to lag behind
4. to lose
5. to go missing
6. to reduce
7. fall (in prices)
8. to lose (value, weight etc)
9. to wag
10. to swing
11. to turn
12. to change
13. to exchange
14. to swap
15. to show off
16. to shed (hair)
17. (used after certain verbs to express completion, fulfillment, removal etc)" diào 掉 掉
"1. meat pie
2. pie
3. pasty" xiàn bǐng 馅饼 餡餅
1. thereupon; as a result; consequently; thus; hence yú shì 于是 於是
1. immediately; at once; right away lì kè 立刻 立刻
"1. to turn over
2. to flip over
3. to overturn
4. to rummage through
5. to translate
6. to decode
7. to double
8. to climb over or into
9. to cross" fān 翻 翻
"1. fake
2. false
3. artificial
4. to borrow
5. if
6. suppose" jiǎ 假 假
1. to open (one's eyes) zhēng 睁 睜
"1. really
2. sure enough
3. as expected
4. if indeed" guǒ rán 果然 果然
"1. taken in (by sb's deceit)
2. to be fooled
3. to be duped" shàng dàng 上当 上當
"1. brains
2. mind
3. CL:個|个[ge4]" nǎo zi 脑子 腦子
"1. to worry; to feel anxious
2. to feel a sense of urgency; to be in a hurry
3. Taiwan pr. [zhao1ji2]" zháo jí 着急 著急
1 1. gold 2. chemical element Au 3. generic term for lustrous and ductile metals 4. money 5. golden 6. highly respected 7. one of the eight categories of ancient musical instruments 八音[ba1 yin1] jīn
2 1. necklace 2. CL:條|条[tiao2] xiàng liàn 项链 項鏈
3 1. common 2. ordinary 3. general 4. average pǔ tōng 普通 普通
4 1. worker 2. CL:個|个[ge4],名[ming2] gōng rén 工人 工人
5 1. identical 2. same xiāng tóng 相同 相同
6 1. always zǒng shì 总是 總是
7 1. to get rich fā cái 发财 發財
8 1. dream (CL:場|场[chang2],個|个[ge4]) 2. (bound form) to dream mèng
9 1. to pick up; to collect; to gather jiǎn
10 1. purse 2. wallet qián bāo 钱包 錢包
11 1. lottery ticket cǎi piào 彩票 彩票
12 1. to win a prize (in a lottery etc) zhòng jiǎng 中奖 中獎
13 1. to touch 2. to meet with 3. to bump pèng
14 1. ordinarily 2. in normal times 3. in peacetime píng shí 平时 平時
15 1. sudden; abrupt; unexpected tū rán 突然 突然
16 1. to yell 2. to shout 3. to call out for (a person) hǎn
17 1. sound 2. voice 3. tone 4. noise 5. reputation 6. classifier for sounds shēng
18 1. hastily jí máng 急忙 急忙
19 1. to turn 2. to change direction 3. to transfer 4. to forward (mail) 5. (Internet) to share (sb else's content) zhuǎn
20 1. middle age zhōng nián 中年 中年
21 1. woman fù nu:3 妇女 婦女
22 1. finger 2. to point at or to 3. to indicate or refer to 4. to depend on 5. to count on 6. (of hair) to stand on end zhǐ
23 1. earth 2. ground 3. field 4. place 5. land 6. CL:片[pian4]
24 1. careful; attentive; cautious 2. to be careful; to look out 3. (dialect) thrifty; frugal zǐ xì 仔细 仔細
25 1. one 2. single 3. a (article) 4. as soon as 5. entire; whole; all; throughout 6. 'one' radical in Chinese characters (Kangxi radical 1) 7. also pr. [yao1] for greater clarity when spelling out numbers digit by digit
26 1. value 2. (to be) worth 3. to happen to 4. to be on duty zhí
27 1. to rise 2. to raise 3. to get up 4. to set out 5. to start 6. to appear 7. to launch 8. to initiate (action) 9. to draft 10. to establish 11. to get (from a depot or counter) 12. verb suffix, to start 13. starting from (a time, place, price etc) 14. classifier for occurrences or unpredictable events: case, instance 15. classifier for groups: batch, group
28 1. to lose 2. to put aside 3. to throw diū
29 1. (coll.) if yào shi 要是 要是
30 1. perhaps; maybe yě xǔ 也许 也許
31 1. (after a verb) indicating the beginning and continuation of an action or a state 2. indicating an upward movement (e.g. after 站[zhan4]) 3. indicating completion 4. (after a perception verb, e.g. 看[kan4]) expressing preliminary judgment 5. also pr. [qi3lai5] qi lai 起来 起來
32 1. this kind of 2. so 3. this way 4. like this 5. such zhè yàng 这样 這樣
33 1. to divide; to separate 2. to distribute; to allocate 3. to distinguish (good and bad) 4. (bound form) branch of (an organization); sub- (as in 分局[fen1 ju2]) 5. fraction 6. one tenth (of certain units) 7. unit of length equivalent to 0.33 cm 8. minute (unit of time) 9. minute (angular measurement unit) 10. a point (in sports or games) 11. 0.01 yuan (unit of money) fēn
34 1. to fall 2. to drop 3. to lag behind 4. to lose 5. to go missing 6. to reduce 7. fall (in prices) 8. to lose (value, weight etc) 9. to wag 10. to swing 11. to turn 12. to change 13. to exchange 14. to swap 15. to show off 16. to shed (hair) 17. (used after certain verbs to express completion, fulfillment, removal etc) diào
35 1. meat pie 2. pie 3. pasty xiàn bǐng 馅饼 餡餅
36 1. thereupon; as a result; consequently; thus; hence yú shì 于是 於是
37 1. immediately; at once; right away lì kè 立刻 立刻
38 1. to turn over 2. to flip over 3. to overturn 4. to rummage through 5. to translate 6. to decode 7. to double 8. to climb over or into 9. to cross fān
39 1. fake 2. false 3. artificial 4. to borrow 5. if 6. suppose jiǎ
40 1. to open (one's eyes) zhēng
41 1. really 2. sure enough 3. as expected 4. if indeed guǒ rán 果然 果然
42 1. taken in (by sb's deceit) 2. to be fooled 3. to be duped shàng dàng 上当 上當
43 1. brains 2. mind 3. CL:個|个[ge4] nǎo zi 脑子 腦子
44 1. to worry; to feel anxious 2. to feel a sense of urgency; to be in a hurry 3. Taiwan pr. [zhao1ji2] zháo jí 着急 著急

View File

@@ -0,0 +1,44 @@
项链
普通
工人
相同
总是
发财
钱包
彩票
中奖
平时
突然
急忙
中年
妇女
仔细
要是
也许
起来
这样
馅饼
于是
立刻
果然
上当
脑子
着急