Debian Codegraph @

plugins/jieba/tests/data/jieba_comparison_testcases.json

raw symbols SCIP
1 {
2 "description": "Test cases comparing Jieba segmentation vs mmseg for Chinese conversion",
3 "cases": [
4 {
5 "id": "jieba_s2t_001",
6 "description": "Ambiguous case: 的/士兵 vs 的士/兵",
7 "input": "勇敢的士兵",
8 "expected_segmentation": "勇敢/的/士兵",
9 "expected": {
10 "s2twp": "勇敢計程車兵",
11 "s2twp_jieba": "勇敢的士兵"
12 }
13 },
14 {
15 "id": "jieba_t2s_001",
16 "description": "Traditional to Simplified: 著名/為 conversion 这个有问题",
17 "input": "生活著名為正敏的少女",
18 "expected_segmentation": "生活/著名/為/正敏/的/少女",
19 "expected": {
20 "tw2sp": "生活著名为正敏的少女",
21 "tw2sp_jieba": "生活著名为正敏的少女"
22 }
23 },
24 {
25 "id": "jieba_t2s_tofu_001",
26 "description": "Tofu-risk dictionary is skipped by default in CLI",
27 "input": "㑮",
28 "expected_segmentation": "㑮",
29 "expected": {
30 "tw2sp_jieba": "㑮",
31 "hk2sp_jieba": "㑮"
32 }
33 },
34 {
35 "id": "jieba_s2t_002",
36 "description": "Compound words: 中学生 (middle school student) and 中等身材 (medium build)",
37 "input": "一个中学生,一个中等身材的人",
38 "expected_segmentation": "一个/中学生/,/一个/中等/身材/的/人",
39 "expected": {
40 "s2twp": "一箇中學生,一箇中等身材的人",
41 "s2twp_jieba": "一個中學生,一個中等身材的人"
42 }
43 },
44 {
45 "id": "jieba_t2s_002",
46 "description": "Traditional to Simplified: Compound words 中學生, 中等身材",
47 "input": "一個中學生,一個中等身材的人",
48 "expected_segmentation": "一個/中學生/,/一個/中等/身材/的/人",
49 "expected": {
50 "tw2sp": "一个中学生,一个中等身材的人",
51 "tw2sp_jieba": "一个中学生,一个中等身材的人"
52 }
53 },
54 {
55 "id": "jieba_s2t_003",
56 "description": "Proper nouns: 北京清华大学, 自然语言处理",
57 "input": "我来到北京清华大学学习自然语言处理",
58 "expected_segmentation": "我/来到/北京/清华大学/学习/自然语言/处理",
59 "expected": {
60 "s2twp": "我來到北京清華大學學習自然語言處理",
61 "s2twp_jieba": "我來到北京清華大學學習自然語言處理"
62 }
63 },
64 {
65 "id": "jieba_t2s_003",
66 "description": "Complex traditional: 來到/學習/語言/處理",
67 "input": "我來到北京清華大學學習自然語言處理",
68 "expected_segmentation": "我來/到/北京/清華大學/學習/自然/語言/處理",
69 "expected": {
70 "tw2sp": "我来到北京清华大学学习自然语言处理",
71 "tw2sp_jieba": "我来到北京清华大学学习自然语言处理"
72 }
73 },
74 {
75 "id": "jieba_s2t_004",
76 "description": "Modern terms: 软件, 用户体验",
77 "input": "这个软件的用户体验很好",
78 "expected_segmentation": "这个/软件/的/用户/体验/很/好",
79 "expected": {
80 "s2t_jieba": "這個軟件的用戶體驗很好",
81 "s2tw_jieba": "這個軟件的用戶體驗很好",
82 "s2hk_jieba": "這個軟件的用户體驗很好",
83 "s2twp": "這個軟體的使用者體驗很好",
84 "s2twp_jieba": "這個軟體的使用者體驗很好"
85 }
86 },
87 {
88 "id": "jieba_t2s_004",
89 "description": "Taiwan term: 軟體 -> 软件",
90 "input": "這個軟體的功能很強大",
91 "expected_segmentation": "這個/軟體/的/功能/很強/大",
92 "expected": {
93 "tw2sp": "这个软件的功能很强大",
94 "tw2sp_jieba": "这个软件的功能很强大"
95 }
96 },
97 {
98 "id": "jieba_s2t_005",
99 "description": "Mixed content: English + Chinese",
100 "input": "OpenCC是一个开源的中文简繁转换项目",
101 "expected_segmentation": "OpenCC/是/一个/开源/的/中文/简繁转换/项目",
102 "expected": {
103 "s2twp": "OpenCC是一個開源的中文簡繁轉換專案",
104 "s2twp_jieba": "OpenCC是一個開源的中文簡繁轉換專案"
105 }
106 },
107 {
108 "id": "jieba_s2t_006",
109 "description": "Ambiguous: 的确 (indeed) vs 的/确实 (possessive + really)",
110 "input": "他说的确实在理",
111 "expected_segmentation": "他/说/的/确实/在理",
112 "expected": {
113 "s2twp": "他說的確實在理",
114 "s2twp_jieba": "他說的確實在理"
115 }
116 },
117 {
118 "id": "jieba_s2t_007",
119 "description": "Multiple ambiguities: 研究生/命 vs 研究/生命",
120 "input": "研究生命科学的重要性",
121 "expected_segmentation": "研究/生命科学/的/重要性",
122 "expected": {
123 "s2twp": "研究生命科學的重要性",
124 "s2twp_jieba": "研究生命科學的重要性"
125 }
126 },
127 {
128 "id": "jieba_s2t_008",
129 "description": "Taiwan term: 软体 (software - Taiwan usage)",
130 "input": "这个软体的功能很强大",
131 "expected_segmentation": "这个/软体/的/功能/很/强大",
132 "expected": {
133 "s2twp": "這個軟體的功能很強大",
134 "s2twp_jieba": "這個軟體的功能很強大"
135 }
136 },
137 {
138 "id": "jieba_s2t_009",
139 "description": "Long compounds: 人工智能, 医疗保健",
140 "input": "人工智能技术在医疗保健领域的应用",
141 "expected_segmentation": "人工智能/技术/在/医疗保健/领域/的/应用",
142 "expected": {
143 "s2twp": "人工智慧技術在醫療保健領域的應用",
144 "s2twp_jieba": "人工智慧技術在醫療保健領域的應用"
145 }
146 },
147 {
148 "id": "jieba_s2t_010",
149 "description": "Classical Chinese proverb",
150 "input": "温故而知新,可以为师矣",
151 "expected_segmentation": "温故而知新/,/可以/为师/矣",
152 "expected": {
153 "s2twp": "溫故而知新,可以為師矣",
154 "s2twp_jieba": "溫故而知新,可以為師矣"
155 }
156 },
157 {
158 "id": "jieba_s2t_BYVoid_OpenCC_Issue767",
159 "description": "验证繁转简 慰藉 是否被正确当成一个词",
160 "input": "奶茶店慰藉著旅者的味蕾",
161 "expected_segmentation": "奶茶/店/慰藉/著/旅者/的/味蕾",
162 "expected": {
163 "tw2sp": "奶茶店慰借着旅者的味蕾",
164 "tw2sp_jieba": "奶茶店慰藉着旅者的味蕾"
165 }
166 },
167 {
168 "id": "jieba_s2t_BYVoid_OpenCC_Issue664",
169 "description": "Longer XX的士兵 sentence should keep 士兵 as a phrase instead of converting 的士",
170 "input": "城堡的士兵已经出发",
171 "expected_segmentation": "城堡/的/士兵/已经/出发",
172 "expected": {
173 "s2twp": "城堡計程車兵已經出發",
174 "s2twp_jieba": "城堡的士兵已經出發"
175 }
176 },
177 {
178 "id": "jieba_s2t_BYVoid_OpenCC_PR1248",
179 "description": "Jieba configs should apply regional variant phrase exceptions before per-character 皁 -> 皂 variants",
180 "input": "牛骥同皁 牛骥同皂 牛骥同一皁 牛骥同一皂",
181 "expected_segmentation": "牛骥同皁/ /牛骥同皂/ /牛骥同一皁/ /牛骥同一皂",
182 "expected": {
183 "s2tw_jieba": "牛驥同皁 牛驥同皁 牛驥同一皁 牛驥同一皁",
184 "s2hk_jieba": "牛驥同皁 牛驥同皁 牛驥同一皁 牛驥同一皁",
185 "s2twp_jieba": "牛驥同皁 牛驥同皁 牛驥同一皁 牛驥同一皁"
186 }
187 },
188 {
189 "id": "jieba_s2t_011",
190 "description": "一百/年历 is incorrect mmseg result; sourced from https://ayaka.shn.hk/s2tfont/hant/",
191 "input": "拥有一百年历史",
192 "expected_segmentation": "拥有/一百年/历史",
193 "expected": {
194 "s2twp": "擁有一百年曆史",
195 "s2twp_jieba": "擁有一百年歷史"
196 }
197 },
198 {
199 "id": "jieba_s2t_BYVoid_OpenCC_Issue175",
200 "description": "Jieba should keep 刚一出 as a motion phrase while preserving 一出 as a classifier",
201 "input": "刚一出火车站,就直奔剧场看了一出单口喜剧,演员演的有一点出戏,一出剧院[sic],就发现一出租车停在门口招揽生意",
202 "expected": {
203 "s2t_jieba": "剛一出火車站,就直奔劇場看了一齣單口喜劇,演員演的有一點出戲,一齣劇院[sic],就發現一出租車停在門口招攬生意"
204 }
205 }
206 ]
207 }