@termdock/twlint 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +176 -63
  2. package/bin/twlint +4 -2
  3. package/dist/cli.d.ts +2 -0
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +63 -12
  6. package/dist/cli.js.map +1 -1
  7. package/dist/core/config-schema.d.ts +1 -0
  8. package/dist/core/config-schema.d.ts.map +1 -1
  9. package/dist/core/config-schema.js +33 -7
  10. package/dist/core/config-schema.js.map +1 -1
  11. package/dist/core/dictionary-loading-strategies.d.ts +45 -0
  12. package/dist/core/dictionary-loading-strategies.d.ts.map +1 -0
  13. package/dist/core/dictionary-loading-strategies.js +75 -0
  14. package/dist/core/dictionary-loading-strategies.js.map +1 -0
  15. package/dist/core/dictionary-manager.d.ts +2 -1
  16. package/dist/core/dictionary-manager.d.ts.map +1 -1
  17. package/dist/core/dictionary-manager.js +51 -16
  18. package/dist/core/dictionary-manager.js.map +1 -1
  19. package/dist/core/linter.d.ts +2 -6
  20. package/dist/core/linter.d.ts.map +1 -1
  21. package/dist/core/linter.js +82 -58
  22. package/dist/core/linter.js.map +1 -1
  23. package/dist/core/lru-cache.d.ts +18 -0
  24. package/dist/core/lru-cache.d.ts.map +1 -0
  25. package/dist/core/lru-cache.js +57 -0
  26. package/dist/core/lru-cache.js.map +1 -0
  27. package/dist/core/matching/match-strategies.d.ts +19 -11
  28. package/dist/core/matching/match-strategies.d.ts.map +1 -1
  29. package/dist/core/matching/match-strategies.js +44 -74
  30. package/dist/core/matching/match-strategies.js.map +1 -1
  31. package/dist/core/rules/mainland-terms.d.ts +3 -1
  32. package/dist/core/rules/mainland-terms.d.ts.map +1 -1
  33. package/dist/core/rules/mainland-terms.js +25 -4
  34. package/dist/core/rules/mainland-terms.js.map +1 -1
  35. package/dist/dictionaries/academic.json +242 -22
  36. package/dist/dictionaries/ai-emerging-tech.json +3209 -0
  37. package/dist/dictionaries/business-finance.json +3449 -0
  38. package/dist/dictionaries/core.json +2902 -248
  39. package/dist/dictionaries/hardware-3c.json +2649 -0
  40. package/dist/dictionaries/index.json +70 -8
  41. package/dist/dictionaries/network-cloud.json +2953 -0
  42. package/dist/dictionaries/operating-system.json +2889 -0
  43. package/dist/dictionaries/social-media.json +2833 -0
  44. package/dist/dictionaries/software-development.json +3809 -0
  45. package/dist/dictionaries/user-interface.json +3225 -0
  46. package/dist/formatters/stylish.d.ts.map +1 -1
  47. package/dist/formatters/stylish.js +5 -15
  48. package/dist/formatters/stylish.js.map +1 -1
  49. package/dist/types.d.ts +20 -8
  50. package/dist/types.d.ts.map +1 -1
  51. package/dist/utils/error-utils.d.ts +9 -0
  52. package/dist/utils/error-utils.d.ts.map +1 -0
  53. package/dist/utils/error-utils.js +15 -0
  54. package/dist/utils/error-utils.js.map +1 -0
  55. package/package.json +5 -5
@@ -9,133 +9,353 @@
9
9
  "taiwan": "演算法",
10
10
  "confidence": 0.9,
11
11
  "category": "mainland-term",
12
- "reason": "台灣學術標準用語"
12
+ "reason": "台灣學術標準用語",
13
+ "match_type": "exact",
14
+ "autofix_safe": false
15
+ },
16
+ "算法_algo_analysis": {
17
+ "taiwan": "演算法",
18
+ "confidence": 0.9,
19
+ "category": "mainland-term",
20
+ "reason": "台灣學術標準用語",
21
+ "match_type": "exact",
22
+ "autofix_safe": false
13
23
  },
14
24
  "数据结构": {
15
25
  "taiwan": "資料結構",
16
26
  "confidence": 0.95,
17
27
  "category": "mainland-term",
18
- "reason": "台灣計算機科學標準"
28
+ "reason": "台灣計算機科學標準",
29
+ "match_type": "exact",
30
+ "autofix_safe": false
31
+ },
32
+ "数据结构_data_structure": {
33
+ "taiwan": "資料結構",
34
+ "confidence": 0.95,
35
+ "category": "mainland-term",
36
+ "reason": "台灣計算機科學標準",
37
+ "match_type": "exact",
38
+ "autofix_safe": false
19
39
  },
20
40
  "數據結構": {
21
41
  "taiwan": "資料結構",
22
42
  "confidence": 0.95,
23
43
  "category": "mainland-term",
24
- "reason": "台灣計算機科學標準"
44
+ "reason": "台灣計算機科學標準",
45
+ "match_type": "exact",
46
+ "autofix_safe": false
47
+ },
48
+ "數據結構_data_structure": {
49
+ "taiwan": "資料結構",
50
+ "confidence": 0.95,
51
+ "category": "mainland-term",
52
+ "reason": "台灣計算機科學標準",
53
+ "match_type": "exact",
54
+ "autofix_safe": false
25
55
  },
26
56
  "计算机科学": {
27
57
  "taiwan": "計算機科學",
28
58
  "confidence": 0.85,
29
59
  "category": "mainland-term",
30
- "reason": "台灣學術慣用語"
60
+ "reason": "台灣學術慣用語",
61
+ "match_type": "exact",
62
+ "autofix_safe": false
63
+ },
64
+ "计算机科学_computer_science": {
65
+ "taiwan": "計算機科學",
66
+ "confidence": 0.85,
67
+ "category": "mainland-term",
68
+ "reason": "台灣學術慣用語",
69
+ "match_type": "exact",
70
+ "autofix_safe": false
31
71
  },
32
72
  "計算機科學": {
33
73
  "taiwan": "計算機科學",
34
74
  "confidence": 0.85,
35
75
  "category": "mainland-term",
36
- "reason": "台灣學術慣用語"
76
+ "reason": "台灣學術慣用語",
77
+ "match_type": "exact",
78
+ "autofix_safe": false
79
+ },
80
+ "計算機科學_computer_science": {
81
+ "taiwan": "計算機科學",
82
+ "confidence": 0.85,
83
+ "category": "mainland-term",
84
+ "reason": "台灣學術慣用語",
85
+ "match_type": "exact",
86
+ "autofix_safe": false
37
87
  },
38
88
  "人工智能": {
39
89
  "taiwan": "人工智慧",
40
90
  "confidence": 0.9,
41
91
  "category": "mainland-term",
42
- "reason": "台灣AI領域標準"
92
+ "reason": "台灣AI領域標準",
93
+ "match_type": "exact",
94
+ "autofix_safe": false
95
+ },
96
+ "人工智能_artificial_intelligence": {
97
+ "taiwan": "人工智慧",
98
+ "confidence": 0.9,
99
+ "category": "mainland-term",
100
+ "reason": "台灣AI領域標準",
101
+ "match_type": "exact",
102
+ "autofix_safe": false
43
103
  },
44
104
  "机器学习": {
45
105
  "taiwan": "機器學習",
46
106
  "confidence": 0.8,
47
107
  "category": "mainland-term",
48
- "reason": "台灣ML領域用語"
108
+ "reason": "台灣ML領域用語",
109
+ "match_type": "exact",
110
+ "autofix_safe": false
111
+ },
112
+ "机器学习_machine_learning": {
113
+ "taiwan": "機器學習",
114
+ "confidence": 0.8,
115
+ "category": "mainland-term",
116
+ "reason": "台灣ML領域用語",
117
+ "match_type": "exact",
118
+ "autofix_safe": false
49
119
  },
50
120
  "機器學習": {
51
121
  "taiwan": "機器學習",
52
122
  "confidence": 0.8,
53
123
  "category": "mainland-term",
54
- "reason": "台灣ML領域用語"
124
+ "reason": "台灣ML領域用語",
125
+ "match_type": "exact",
126
+ "autofix_safe": false
127
+ },
128
+ "機器學習_machine_learning": {
129
+ "taiwan": "機器學習",
130
+ "confidence": 0.8,
131
+ "category": "mainland-term",
132
+ "reason": "台灣ML領域用語",
133
+ "match_type": "exact",
134
+ "autofix_safe": false
55
135
  },
56
136
  "数据库系统": {
57
137
  "taiwan": "資料庫系統",
58
138
  "confidence": 0.95,
59
139
  "category": "mainland-term",
60
- "reason": "台灣資訊科學標準"
140
+ "reason": "台灣資訊科學標準",
141
+ "match_type": "exact",
142
+ "autofix_safe": false
143
+ },
144
+ "数据库系统_database_system": {
145
+ "taiwan": "資料庫系統",
146
+ "confidence": 0.95,
147
+ "category": "mainland-term",
148
+ "reason": "台灣資訊科學標準",
149
+ "match_type": "exact",
150
+ "autofix_safe": false
61
151
  },
62
152
  "數據庫系統": {
63
153
  "taiwan": "資料庫系統",
64
154
  "confidence": 0.95,
65
155
  "category": "mainland-term",
66
- "reason": "台灣資訊科學標準"
156
+ "reason": "台灣資訊科學標準",
157
+ "match_type": "exact",
158
+ "autofix_safe": false
159
+ },
160
+ "數據庫系統_database_system": {
161
+ "taiwan": "資料庫系統",
162
+ "confidence": 0.95,
163
+ "category": "mainland-term",
164
+ "reason": "台灣資訊科學標準",
165
+ "match_type": "exact",
166
+ "autofix_safe": false
67
167
  },
68
168
  "操作系统": {
69
169
  "taiwan": "作業系統",
70
170
  "confidence": 0.9,
71
171
  "category": "mainland-term",
72
- "reason": "台灣系統軟體標準"
172
+ "reason": "台灣系統軟體標準",
173
+ "match_type": "exact",
174
+ "autofix_safe": false
175
+ },
176
+ "操作系统_operating_system": {
177
+ "taiwan": "作業系統",
178
+ "confidence": 0.9,
179
+ "category": "mainland-term",
180
+ "reason": "台灣系統軟體標準",
181
+ "match_type": "exact",
182
+ "autofix_safe": false
73
183
  },
74
184
  "操作系統": {
75
185
  "taiwan": "作業系統",
76
186
  "confidence": 0.9,
77
187
  "category": "mainland-term",
78
- "reason": "台灣系統軟體標準"
188
+ "reason": "台灣系統軟體標準",
189
+ "match_type": "exact",
190
+ "autofix_safe": false
191
+ },
192
+ "操作系統_operating_system": {
193
+ "taiwan": "作業系統",
194
+ "confidence": 0.9,
195
+ "category": "mainland-term",
196
+ "reason": "台灣系統軟體標準",
197
+ "match_type": "exact",
198
+ "autofix_safe": false
79
199
  },
80
200
  "用户界面": {
81
201
  "taiwan": "使用者介面",
82
202
  "confidence": 0.85,
83
203
  "category": "mainland-term",
84
- "reason": "台灣HCI標準用語"
204
+ "reason": "台灣HCI標準用語",
205
+ "match_type": "exact",
206
+ "autofix_safe": false
207
+ },
208
+ "用户界面_user_interface": {
209
+ "taiwan": "使用者介面",
210
+ "confidence": 0.85,
211
+ "category": "mainland-term",
212
+ "reason": "台灣HCI標準用語",
213
+ "match_type": "exact",
214
+ "autofix_safe": false
85
215
  },
86
216
  "用戶界面": {
87
217
  "taiwan": "使用者介面",
88
218
  "confidence": 0.85,
89
219
  "category": "mainland-term",
90
- "reason": "台灣HCI標準用語"
220
+ "reason": "台灣HCI標準用語",
221
+ "match_type": "exact",
222
+ "autofix_safe": false
223
+ },
224
+ "用戶界面_user_interface": {
225
+ "taiwan": "使用者介面",
226
+ "confidence": 0.85,
227
+ "category": "mainland-term",
228
+ "reason": "台灣HCI標準用語",
229
+ "match_type": "exact",
230
+ "autofix_safe": false
91
231
  },
92
232
  "面向对象": {
93
233
  "taiwan": "物件導向",
94
234
  "confidence": 0.8,
95
235
  "category": "mainland-term",
96
- "reason": "台灣程式設計標準"
236
+ "reason": "台灣程式設計標準",
237
+ "match_type": "exact",
238
+ "autofix_safe": false
239
+ },
240
+ "面向对象_object_oriented": {
241
+ "taiwan": "物件導向",
242
+ "confidence": 0.8,
243
+ "category": "mainland-term",
244
+ "reason": "台灣程式設計標準",
245
+ "match_type": "exact",
246
+ "autofix_safe": false
97
247
  },
98
248
  "面向對象": {
99
249
  "taiwan": "物件導向",
100
250
  "confidence": 0.8,
101
251
  "category": "mainland-term",
102
- "reason": "台灣程式設計標準"
252
+ "reason": "台灣程式設計標準",
253
+ "match_type": "exact",
254
+ "autofix_safe": false
255
+ },
256
+ "面向對象_object_oriented": {
257
+ "taiwan": "物件導向",
258
+ "confidence": 0.8,
259
+ "category": "mainland-term",
260
+ "reason": "台灣程式設計標準",
261
+ "match_type": "exact",
262
+ "autofix_safe": false
103
263
  },
104
264
  "函数式编程": {
105
265
  "taiwan": "函數式程式設計",
106
266
  "confidence": 0.75,
107
267
  "category": "mainland-term",
108
- "reason": "台灣程式語言理論"
268
+ "reason": "台灣程式語言理論",
269
+ "match_type": "exact",
270
+ "autofix_safe": false
271
+ },
272
+ "函数式编程_functional_programming": {
273
+ "taiwan": "函數式程式設計",
274
+ "confidence": 0.75,
275
+ "category": "mainland-term",
276
+ "reason": "台灣程式語言理論",
277
+ "match_type": "exact",
278
+ "autofix_safe": false
109
279
  },
110
280
  "函數式編程": {
111
281
  "taiwan": "函數式程式設計",
112
282
  "confidence": 0.75,
113
283
  "category": "mainland-term",
114
- "reason": "台灣程式語言理論"
284
+ "reason": "台灣程式語言理論",
285
+ "match_type": "exact",
286
+ "autofix_safe": false
287
+ },
288
+ "函數式編程_functional_programming": {
289
+ "taiwan": "函數式程式設計",
290
+ "confidence": 0.75,
291
+ "category": "mainland-term",
292
+ "reason": "台灣程式語言理論",
293
+ "match_type": "exact",
294
+ "autofix_safe": false
115
295
  },
116
296
  "计算机视觉": {
117
297
  "taiwan": "電腦視覺",
118
298
  "confidence": 0.85,
119
299
  "category": "mainland-term",
120
- "reason": "台灣影像處理標準"
300
+ "reason": "台灣影像處理標準",
301
+ "match_type": "exact",
302
+ "autofix_safe": false
303
+ },
304
+ "计算机视觉_computer_vision": {
305
+ "taiwan": "電腦視覺",
306
+ "confidence": 0.85,
307
+ "category": "mainland-term",
308
+ "reason": "台灣影像處理標準",
309
+ "match_type": "exact",
310
+ "autofix_safe": false
121
311
  },
122
312
  "計算機視覺": {
123
313
  "taiwan": "電腦視覺",
124
314
  "confidence": 0.85,
125
315
  "category": "mainland-term",
126
- "reason": "台灣影像處理標準"
316
+ "reason": "台灣影像處理標準",
317
+ "match_type": "exact",
318
+ "autofix_safe": false
319
+ },
320
+ "計算機視覺_computer_vision": {
321
+ "taiwan": "電腦視覺",
322
+ "confidence": 0.85,
323
+ "category": "mainland-term",
324
+ "reason": "台灣影像處理標準",
325
+ "match_type": "exact",
326
+ "autofix_safe": false
127
327
  },
128
328
  "自然语言处理": {
129
329
  "taiwan": "自然語言處理",
130
330
  "confidence": 0.9,
131
331
  "category": "mainland-term",
132
- "reason": "台灣NLP標準用語"
332
+ "reason": "台灣NLP標準用語",
333
+ "match_type": "exact",
334
+ "autofix_safe": false
335
+ },
336
+ "自然语言处理_natural_language": {
337
+ "taiwan": "自然語言處理",
338
+ "confidence": 0.9,
339
+ "category": "mainland-term",
340
+ "reason": "台灣NLP標準用語",
341
+ "match_type": "exact",
342
+ "autofix_safe": false
133
343
  },
134
344
  "自然語言處理": {
135
345
  "taiwan": "自然語言處理",
136
346
  "confidence": 0.9,
137
347
  "category": "mainland-term",
138
- "reason": "台灣NLP標準用語"
348
+ "reason": "台灣NLP標準用語",
349
+ "match_type": "exact",
350
+ "autofix_safe": false
351
+ },
352
+ "自然語言處理_natural_language": {
353
+ "taiwan": "自然語言處理",
354
+ "confidence": 0.9,
355
+ "category": "mainland-term",
356
+ "reason": "台灣NLP標準用語",
357
+ "match_type": "exact",
358
+ "autofix_safe": false
139
359
  }
140
360
  }
141
361
  }