Pop-up dictionary browser extension for language learning. Successor to Yomichan. (PERSONAL FORK)
1{
2 "optionsPresets": {
3 "kanji": {
4 "type": "kanji",
5 "enabledDictionaryMap": [
6 [
7 "${title}",
8 {
9 "index": 0,
10 "alias": "kanjiDictAlias"
11 }
12 ]
13 ],
14 "removeNonJapaneseCharacters": false
15 },
16 "default": {
17 "type": "terms",
18 "matchType": "exact",
19 "deinflect": true,
20 "mainDictionary": "${title}",
21 "sortFrequencyDictionary": null,
22 "sortFrequencyDictionaryOrder": "descending",
23 "removeNonJapaneseCharacters": true,
24 "language": "ja",
25 "textReplacements": [
26 null
27 ],
28 "enabledDictionaryMap": [
29 [
30 "${title}",
31 {
32 "index": 0,
33 "alias": "termsDictAlias",
34 "allowSecondarySearches": false,
35 "partsOfSpeechFilter": true,
36 "useDeinflections": true
37 }
38 ]
39 ]
40 }
41 },
42 "tests": [
43 {
44 "name": "Basic kanji test 1",
45 "func": "findKanji",
46 "text": "打",
47 "options": "kanji"
48 },
49 {
50 "name": "Basic kanji test 2",
51 "func": "findKanji",
52 "text": "込",
53 "options": "kanji"
54 },
55 {
56 "name": "Missing kanji test",
57 "func": "findKanji",
58 "text": "画",
59 "options": "kanji"
60 },
61 {
62 "name": "Find term using expression text 1",
63 "func": "findTerms",
64 "mode": "split",
65 "text": "打",
66 "options": "default"
67 },
68 {
69 "name": "Find term using expression text 2",
70 "func": "findTerms",
71 "mode": "split",
72 "text": "打つ",
73 "options": "default"
74 },
75 {
76 "name": "Find term using expression text 3",
77 "func": "findTerms",
78 "mode": "split",
79 "text": "打ち込む",
80 "options": "default"
81 },
82 {
83 "name": "Find term using expression text 4",
84 "func": "findTerms",
85 "mode": "split",
86 "text": "画像",
87 "options": "default"
88 },
89 {
90 "name": "Find term using reading 1",
91 "func": "findTerms",
92 "mode": "split",
93 "text": "だ",
94 "options": "default"
95 },
96 {
97 "name": "Find term using reading 2",
98 "func": "findTerms",
99 "mode": "split",
100 "text": "ダース",
101 "options": "default"
102 },
103 {
104 "name": "Find term using reading 3",
105 "func": "findTerms",
106 "mode": "split",
107 "text": "うつ",
108 "options": "default"
109 },
110 {
111 "name": "Find term using reading 4",
112 "func": "findTerms",
113 "mode": "split",
114 "text": "ぶつ",
115 "options": "default"
116 },
117 {
118 "name": "Find term using reading 5",
119 "func": "findTerms",
120 "mode": "split",
121 "text": "うちこむ",
122 "options": "default"
123 },
124 {
125 "name": "Find term using reading 6",
126 "func": "findTerms",
127 "mode": "split",
128 "text": "ぶちこむ",
129 "options": "default"
130 },
131 {
132 "name": "Find term using reading 7",
133 "func": "findTerms",
134 "mode": "split",
135 "text": "がぞう",
136 "options": "default"
137 },
138 {
139 "name": "Missing term 1",
140 "func": "findTerms",
141 "mode": "split",
142 "text": "為る",
143 "options": "default"
144 },
145 {
146 "name": "Missing term 2",
147 "func": "findTerms",
148 "mode": "split",
149 "text": "する",
150 "options": "default"
151 },
152 {
153 "name": "Search using different modes - simple",
154 "func": "findTerms",
155 "mode": "simple",
156 "text": "打ち込む",
157 "options": "default"
158 },
159 {
160 "name": "Search using different modes - group",
161 "func": "findTerms",
162 "mode": "group",
163 "text": "打ち込む",
164 "options": "default"
165 },
166 {
167 "name": "Search using different modes - merge",
168 "func": "findTerms",
169 "mode": "merge",
170 "text": "打ち込む",
171 "options": "default"
172 },
173 {
174 "name": "Search using different modes - term",
175 "func": "findTerms",
176 "mode": "term",
177 "text": "打ち込む",
178 "options": "default"
179 },
180 {
181 "name": "Search inflected term",
182 "func": "findTerms",
183 "mode": "split",
184 "text": "打ち込んでいませんでした",
185 "options": "default"
186 },
187 {
188 "name": "Ignore text inside parentheses",
189 "func": "findTerms",
190 "mode": "split",
191 "text": "打(う)ち込(こ)む",
192 "options": [
193 "default",
194 {
195 "type": "terms",
196 "removeNonJapaneseCharacters": false,
197 "textReplacements": [
198 null,
199 [
200 {
201 "pattern": "\\(([^)]*)(?:\\))",
202 "flags": "g",
203 "replacement": ""
204 }
205 ]
206 ]
207 }
208 ]
209 },
210 {
211 "name": "Remove parentheses around text",
212 "func": "findTerms",
213 "mode": "split",
214 "text": "(打)(ち)(込)(む)",
215 "options": [
216 "default",
217 {
218 "type": "terms",
219 "removeNonJapaneseCharacters": false,
220 "textReplacements": [
221 null,
222 [
223 {
224 "pattern": "\\(([^)]*)(?:\\))",
225 "flags": "g",
226 "replacement": "$1"
227 }
228 ]
229 ]
230 }
231 ]
232 },
233 {
234 "name": "Test non-empty replacement",
235 "func": "findTerms",
236 "mode": "split",
237 "text": "test",
238 "options": [
239 "default",
240 {
241 "type": "terms",
242 "removeNonJapaneseCharacters": false,
243 "textReplacements": [
244 null,
245 [
246 {
247 "pattern": "test",
248 "flags": "g",
249 "replacement": "よみ"
250 }
251 ]
252 ]
253 }
254 ]
255 },
256 {
257 "name": "Test non-empty replacement at end",
258 "func": "findTerms",
259 "mode": "split",
260 "text": "つtest",
261 "options": [
262 "default",
263 {
264 "type": "terms",
265 "removeNonJapaneseCharacters": false,
266 "textReplacements": [
267 null,
268 [
269 {
270 "pattern": "test",
271 "flags": "g",
272 "replacement": "よみ"
273 }
274 ]
275 ]
276 }
277 ]
278 },
279 {
280 "name": "Test non-empty replacement at start",
281 "func": "findTerms",
282 "mode": "split",
283 "text": "testました",
284 "options": [
285 "default",
286 {
287 "type": "terms",
288 "removeNonJapaneseCharacters": false,
289 "textReplacements": [
290 null,
291 [
292 {
293 "pattern": "test",
294 "flags": "g",
295 "replacement": "よみ"
296 }
297 ]
298 ]
299 }
300 ]
301 },
302 {
303 "name": "Search merged mode with non-primary definitions",
304 "func": "findTerms",
305 "mode": "merge",
306 "text": "うちこむ",
307 "options": "default"
308 },
309 {
310 "name": "Test pronunciations 1",
311 "func": "findTerms",
312 "mode": "split",
313 "text": "お手前",
314 "options": "default"
315 },
316 {
317 "name": "Test pronunciations 2",
318 "func": "findTerms",
319 "mode": "split",
320 "text": "番号",
321 "options": "default"
322 },
323 {
324 "name": "Test pronunciations 3",
325 "func": "findTerms",
326 "mode": "split",
327 "text": "中腰",
328 "options": "default"
329 },
330 {
331 "name": "Test pronunciations 4",
332 "func": "findTerms",
333 "mode": "split",
334 "text": "所業",
335 "options": "default"
336 },
337 {
338 "name": "Test pronunciations 5",
339 "func": "findTerms",
340 "mode": "split",
341 "text": "土木工事",
342 "options": "default"
343 },
344 {
345 "name": "Test pronunciations 6 - phonetic transcriptions",
346 "func": "findTerms",
347 "mode": "split",
348 "text": "好き",
349 "options": "default"
350 },
351 {
352 "name": "Structured content test",
353 "func": "findTerms",
354 "mode": "split",
355 "text": "構造",
356 "options": "default"
357 },
358 {
359 "name": "Test dictionary deinflection",
360 "func": "findTerms",
361 "mode": "split",
362 "text": "のたもうた",
363 "options": "default"
364 },
365 {
366 "name": "Test text preprocessors - convertNumericCharacters",
367 "func": "findTerms",
368 "mode": "split",
369 "text": "39",
370 "options": [
371 "default",
372 {
373 "type": "terms",
374 "removeNonJapaneseCharacters": false
375 }
376 ]
377 },
378 {
379 "name": "Test text preprocessors - alphabeticWidthVariants 1",
380 "func": "findTerms",
381 "mode": "split",
382 "text": "English",
383 "options": [
384 "default",
385 {
386 "type": "terms",
387 "removeNonJapaneseCharacters": false
388 }
389 ]
390 },
391 {
392 "name": "Test text preprocessors - alphabeticWidthVariants 2",
393 "func": "findTerms",
394 "mode": "split",
395 "text": "USB",
396 "options": [
397 "default",
398 {
399 "type": "terms",
400 "removeNonJapaneseCharacters": false
401 }
402 ]
403 },
404 {
405 "name": "Test text preprocessors - alphabeticToHiragana",
406 "func": "findTerms",
407 "mode": "split",
408 "text": "utsu",
409 "options": [
410 "default",
411 {
412 "type": "terms",
413 "removeNonJapaneseCharacters": false
414 }
415 ]
416 },
417 {
418 "name": "Test text preprocessors - convertKatakanaToHiragana",
419 "func": "findTerms",
420 "mode": "split",
421 "text": "ウツ",
422 "options": [
423 "default",
424 {
425 "type": "terms"
426 }
427 ]
428 },
429 {
430 "name": "Test text preprocessors - convertHiraganaToKatakana",
431 "func": "findTerms",
432 "mode": "split",
433 "text": "てきすと",
434 "options": [
435 "default",
436 {
437 "type": "terms"
438 }
439 ]
440 },
441 {
442 "name": "Test text preprocessors - convertHalfWidthCharacters, convertKatakanaToHiragana",
443 "func": "findTerms",
444 "mode": "split",
445 "text": "ウツ",
446 "options": [
447 "default",
448 {
449 "type": "terms"
450 }
451 ]
452 },
453 {
454 "name": "Test text preprocessors - collapseEmphaticSequences",
455 "func": "findTerms",
456 "mode": "split",
457 "text": "すっっごーーい",
458 "options": [
459 "default",
460 {
461 "type": "terms"
462 }
463 ]
464 },
465 {
466 "name": "Test text preprocessors - capitalizeFirstLetter",
467 "func": "findTerms",
468 "mode": "split",
469 "text": "english",
470 "options": [
471 "default",
472 {
473 "type": "terms",
474 "language": "en",
475 "removeNonJapaneseCharacters": false
476 }
477 ]
478 },
479 {
480 "name": "Test text preprocessors - decapitalize",
481 "func": "findTerms",
482 "mode": "split",
483 "text": "LANGUAGE",
484 "options": [
485 "default",
486 {
487 "type": "terms",
488 "language": "en",
489 "removeNonJapaneseCharacters": false
490 }
491 ]
492 },
493 {
494 "name": "Test text postprocessing",
495 "func": "findTerms",
496 "mode": "split",
497 "text": "마시거나",
498 "options": [
499 "default",
500 {
501 "type": "terms",
502 "language": "ko",
503 "removeNonJapaneseCharacters": false
504 }
505 ]
506 },
507 {
508 "name": "Test search resolution - word",
509 "func": "findTerms",
510 "mode": "split",
511 "text": "english example",
512 "options": [
513 "default",
514 {
515 "type": "terms",
516 "language": "en",
517 "removeNonJapaneseCharacters": false,
518 "searchResolution": "word"
519 }
520 ]
521 },
522 {
523 "name": "Find terms using primary reading 1",
524 "func": "findTerms",
525 "mode": "split",
526 "text": "自重",
527 "options": [
528 "default",
529 {
530 "type": "terms",
531 "primaryReading": "じちょう"
532 }
533 ]
534 },
535 {
536 "name": "Find terms using primary reading 2",
537 "func": "findTerms",
538 "mode": "split",
539 "text": "自重",
540 "options": [
541 "default",
542 {
543 "type": "terms",
544 "primaryReading": "じじゅう"
545 }
546 ]
547 }
548 ]
549}