Compare commits

...

10 Commits

Author SHA1 Message Date
wangwei10061 902ad30874 ADD file via upload 2024-10-30 17:13:45 +08:00
wangwei10061 8d624f5a3b ADD file via upload 2024-10-30 17:12:35 +08:00
wangwei10061 f1fb1db252 ADD file via upload 2024-10-30 17:12:21 +08:00
wangwei10061 4b74c99f01 ADD file via upload 2024-10-30 17:12:09 +08:00
weishao 62ebfc39c3 普通文本去除对注释的特殊处理 2023-03-10 11:46:33 +08:00
weishao 3615e01cd8 增加文件后缀限制 2023-01-29 19:56:36 +08:00
weishao 7748a64ec8 增加语言支持 2023-01-29 18:02:19 +08:00
weishao 99dadd8a1a 忽略隐藏文件 2023-01-29 15:41:26 +08:00
weishao 0583684bf3 通用支持 2023-01-29 11:13:18 +08:00
weishao 4b54a5592a 注释 2023-01-28 12:25:05 +08:00
14 changed files with 983 additions and 11 deletions

707
1.csv Normal file
View File

@ -0,0 +1,707 @@
memory_limit,cpu_limit,lower_cpu_limit,request_limit
1,2,0.3,0.2
1,2,0.3,0.4
1,2,0.3,0.4
1,2,0.3,0.4
2.5,2,0.5,0.8
2,2,0.5,0.7
1,2,0.3,0.4
1,2,0.3,0.4
2,2,0.3,0.3
1,2,0.3,0.4
1,1,0.3,0.4
1,2,0.3,0.4
1,2,0.3,0.4
1,2,0.3,0.4
1,2,0.3,0.4
1,2,0.3,0.4
1,2,0.3,0.4
1,2,0.3,0.5
1,2,0.3,0.4
1,1,0.3,0.4
2,2,0.5,0.5
1,2,0.3,0.4
1,2,0.3,0.4
1,2,0.3,0.3
1,1,0.3,0.4
1,1,0.3,0.4
1,2,0.3,0.4
1,2,0.3,0.4
1,2,0.3,0.4
1,2,0.3,0.4
1,2,0.3,0.4
2,2,0.4,0.8
1,2,0.3,0.4
2.5,2,0.4,0.7
1,2,0.3,0.4
1,2,0.3,0.4
1,1,0.3,0.4
1,2,0.3,0.4
3,2,0.5,1.5
1,2,0.3,0.4
4,2,0.5,1
3,2,0.5,1.5
2,2,0.3,0.5
1,1,0.3,0.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 2 0.3 0.3
92 1 2 0.3 0.4
93 1 2 0.3 0.4
94 1 2 0.4 0.3
95 1 2 0.4 0.5
96 1 2 0.3 0.5
97 1 2 0.3 0.4
98 1 1 0.3 0.4
99 1 2 0.4 0.5
100 1 2 0.3 0.4
101 1 2 0.3 0.2
102 1 1 0.3 0.4
103 2 2 0.4 0.5
104 1 2 0.3 0.4
105 1 2 0.4 0.3
106 1 2 0.4 0.5
107 1 2 0.3 0.4
108 1 2 0.3 0.4
109 1 2 0.4 0.5
110 1 2 0.4 0.5
111 2 2 0.3 0.4
112 10 2 0.5 1
113 2 2 0.4 0.7
114 1 1 0.3 0.4
115 1 2 0.4 0.3
116 1 1 0.3 0.4
117 1 1 0.3 0.4
118 4 3 0.5 1
119 1 1 0.3 0.4
120 2 2 0.4 0.5
121 1 1 0.3 0.4
122 1 1 0.3 0.4
123 1 1 0.3 0.4
124 2 2 0.5 0.5
125 1 1 0.3 0.4
126 2 2 0.4 0.6
127 1 1 0.3 0.4
128 1 1 0.3 0.4
129 2 2 0.4 0.5
130 1 1 0.3 0.4
131 1 2 0.4 0.5
132 1 1 0.3 0.4
133 1 1 0.3 0.4
134 1 1 0.3 0.4
135 1 1 0.3 0.4
136 1 1 0.3 0.4
137 1 1 0.3 0.4
138 1 1 0.3 0.4
139 1 1 0.3 0.4
140 1 1 0.3 0.4
141 1 1 0.3 0.4
142 1 1 0.3 0.4
143 1 1 0.3 0.4
144 1 1 0.3 0.4
145 3 2 0.9 1
146 1 1 0.3 0.4
147 1 1 0.3 0.4
148 1 1 0.3 0.4
149 1 1 0.3 0.4
150 1 1 0.3 0.4
151 1 1 0.3 0.4
152 1 1 0.3 0.4
153 1 1 0.3 0.4
154 1 1 0.3 0.4
155 6.4 3 2.5 5.9
156 1 1 0.3 0.4
157 1 1 0.3 0.4
158 1 1 0.3 0.4
159 1 1 0.3 0.4
160 1 1 0.3 0.4
161 1 1 0.3 0.4
162 2 1 0.3 0.4
163 1 1 0.3 0.4
164 1 1 0.3 0.4
165 1 1 0.3 0.4
166 1 1 0.3 0.4
167 1 1 0.3 0.4
168 1 1 0.3 0.4
169 1 1 0.3 0.4
170 1 1 0.3 0.4
171 1 1 0.3 0.4
172 1 1 0.3 0.4
173 1 1 0.3 0.4
174 1 1 0.3 0.4
175 1 1 0.3 0.4
176 1 1 0.3 0.4
177 1 1 0.3 0.4
178 1 1 0.3 0.4
179 2 2 0.4 0.5
180 1 1 0.3 0.4
181 1 1 0.3 0.4
182 1 1 0.3 0.4
183 1 1 0.3 0.4
184 1 1 0.3 0.4
185 1 1 0.3 0.4
186 4 2 0.4 1.7
187 1 1 0.3 0.4
188 1 1 0.3 0.4
189 1 1 0.3 0.4
190 1 1 0.3 0.4
191 1 1 0.3 0.4
192 1 1 0.3 0.4
193 1 1 0.3 0.4
194 2 2 0.5 0.5
195 1 1 0.3 0.4
196 1 1 0.3 0.4
197 1 1 0.3 0.4
198 1 1 0.3 0.4
199 1 1 0.3 0.4
200 1 1 0.3 0.4
201 1 1 0.3 0.4
202 1 1 0.3 0.4
203 2 2 0.3 0.4
204 2 2 0.3 0.4
205 1 1 0.3 0.4
206 1 1 0.3 0.4
207 1 1 0.3 0.4
208 2 2 0.4 0.5
209 1 1 0.3 0.4
210 1 1 0.3 0.4
211 1 1 0.3 0.4
212 1 1 0.3 0.4
213 1 1 0.3 0.4
214 1 1 0.3 0.4
215 1 1 0.3 0.4
216 1 1 0.3 0.4
217 1 1 0.3 0.4
218 1 1 0.3 0.4
219 2 2 0.4 0.5
220 2 2 0.4 0.5
221 1 1 0.3 0.4
222 3 2 0.9 1
223 1 1 0.3 0.4
224 1 1 0.3 0.4
225 1 1 0.3 0.4
226 1 1 0.3 0.4
227 2 2 0.4 0.5
228 1 1 0.3 0.4
229 1 1 0.3 0.4
230 1 1 0.3 0.4
231 1 1 0.3 0.4
232 1 1 0.3 0.4
233 1 1 0.3 0.4
234 2 2 0.4 0.5
235 2 2 0.4 0.5
236 2 2 0.4 0.5
237 2 2 0.4 0.5
238 6.4 2 0.9 1.5
239 1 1 0.3 0.4
240 1 1 0.3 0.4
241 1 1 0.3 0.4
242 1 1 0.3 0.4
243 1 1 0.3 0.4
244 2 2 0.4 0.5
245 1 1 0.3 0.4
246 1 1 0.3 0.4
247 1 1 0.3 0.4
248 2 1 0.3 0.4
249 1 1 0.3 0.4
250 1 1 0.3 0.4
251 1 1 0.3 0.4
252 3 2 0.4 0.7
253 1 1 0.3 0.4
254 1 1 0.3 0.4
255 1 1 0.3 0.4
256 1 1 0.3 0.4
257 1 1 0.3 0.4
258 1 1 0.3 0.4
259 1 1 0.3 0.4
260 1 1 0.3 0.4
261 1 1 0.3 0.4
262 1 1 0.3 0.4
263 1 1 0.3 0.4
264 1 1 0.3 0.4
265 1 1 0.3 0.4
266 1 1 0.3 0.4
267 1 1 0.3 0.4
268 1 1 0.3 0.4
269 1 1 0.3 0.4
270 1 1 0.3 0.4
271 1 1 0.3 0.4
272 1 1 0.3 0.4
273 1 1 0.3 0.4
274 1 1 0.3 0.4
275 4 2 0.3 0.5
276 1 1 0.3 0.4
277 2 2 0.3 0.4
278 1 1 0.3 0.4
279 1 1 0.3 0.4
280 1 1 0.3 0.4
281 4 2 0.3 0.5
282 1 1 0.3 0.4
283 1 1 0.3 0.4
284 1 1 0.3 0.4
285 1 1 0.3 0.4
286 1 1 0.3 0.4
287 1 1 0.3 0.4
288 1 1 0.3 0.4
289 1 1 0.3 0.4
290 1 1 0.3 0.4
291 1 1 0.3 0.4
292 1 1 0.3 0.4
293 1 1 0.3 0.4
294 1 1 0.3 0.4
295 1 1 0.3 0.4
296 1 1 0.3 0.4
297 1 1 0.3 0.4
298 1 1 0.3 0.4
299 1 1 0.3 0.4
300 1 1 0.3 0.4
301 1 1 0.3 0.4
302 1 1 0.3 0.4
303 1 1 0.3 0.4
304 1 1 0.3 0.4
305 1 1 0.3 0.4
306 1 1 0.3 0.4
307 1 1 0.3 0.4
308 1 1 0.3 0.4
309 1 1 0.3 0.4
310 1 1 0.3 0.4
311 1 1 0.3 0.4
312 1 1 0.3 0.4
313 1 1 0.3 0.4
314 1 1 0.3 0.4
315 3 2 0.9 1
316 2 1 0.3 0.4
317 8 4 0.5 1
318 1 1 0.3 0.4
319 1 1 0.3 0.4
320 2 2 0.3 0.3
321 2 2 0.3 0.3
322 2 2 0.4 0.5
323 1 1 0.3 0.4
324 8 4 0.5 1
325 1 1 0.3 0.4
326 1 1 0.3 0.4
327 1 1 0.3 0.4
328 1 1 0.3 0.4
329 1 1 0.3 0.4
330 1 1 0.3 0.4
331 1 1 0.3 0.4
332 1 1 0.3 0.4
333 1 1 0.3 0.4
334 1 1 0.3 0.4
335 1 1 0.3 0.4
336 1 1 0.3 0.4
337 1 1 0.3 0.4
338 1 1 0.3 0.4
339 1 1 0.3 0.4
340 1 1 0.3 0.4
341 1 1 0.3 0.4
342 1 1 0.3 0.4
343 1 1 0.2 0.2
344 1 1 0.3 0.4
345 2 2 0.4 0.5
346 2 2 0.4 0.5
347 2 2 0.4 0.5
348 1 1 0.3 0.4
349 1 1 0.3 0.4
350 1 1 0.3 0.4
351 3 1 0.4 2
352 16 8 4 8
353 1 1 0.3 0.4
354 1 1 0.3 0.4
355 10 2 0.5 2
356 1 1 0.3 0.4
357 1 1 0.3 0.4
358 1 1 0.3 0.4
359 1 1 0.3 0.4
360 1 1 0.3 0.4
361 1 1 0.3 0.4
362 1 1 0.3 0.4
363 1 1 0.3 0.4
364 1 1 0.3 0.4
365 1 1 0.3 0.4
366 5 4 1 1
367 1 1 0.3 0.4
368 1 1 0.3 0.4
369 1 1 0.3 0.4
370 1 2 0.4 0.3
371 1 2 0.4 0.3
372 1 1 0.3 0.4
373 1 1 0.3 0.4
374 1 1 0.3 0.4
375 1 1 0.2 0.2
376 1 1 0.3 0.4
377 1 1 0.3 0.4
378 1 1 0.3 0.4
379 1 1 0.3 0.4
380 1 1 0.3 0.4
381 1 1 0.3 0.4
382 1 1 0.3 0.4
383 1 1 0.3 0.4
384 1 1 0.3 0.4
385 1 1 0.3 0.4
386 1 1 0.3 0.4
387 1 1 0.3 0.4
388 1 1 0.3 0.4
389 1 1 0.3 0.4
390 1 1 0.3 0.4
391 1 1 0.3 0.4
392 1 1 0.3 0.4
393 1 1 0.3 0.4
394 1 1 0.3 0.4
395 1 2 0.3 0.4
396 1 2 0.3 0.4
397 1 2 0.3 0.4
398 0.5 1 0.3 0.4
399 0.5 1 0.3 0.4
400 0.5 1 0.3 0.4
401 1 2 0.3 0.4
402 1 2 0.3 0.4
403 1 2 0.3 0.4
404 1 2 0.3 0.4
405 1 2 0.3 0.4
406 1 1 0.3 0.4
407 1 2 0.3 0.4
408 1 2 0.3 0.4
409 0.5 1 0.3 0.4
410 1 1 0.3 0.4
411 1 1 0.3 0.4
412 1 1 0.3 0.4
413 4 2 0.4 1.7
414 1 1 0.3 0.4
415 1 1 0.3 0.4
416 2 2 0.4 0.6
417 1 1 0.3 0.4
418 1 1 0.3 0.4
419 1 2 0.4 0.5
420 3 2 0.9 1
421 1 1 0.3 0.4
422 1 2 0.4 0.5
423 1 1 0.3 0.4
424 1 1 0.3 0.4
425 1 1 0.3 0.4
426 1 1 0.3 0.4
427 1 1 0.3 0.4
428 1 2 0.4 0.5
429 1 2 0.4 0.5
430 1 1 0.3 0.4
431 0.5 0.5 0.3 0.3
432 2 1 0.5 1
433 1 1 0.3 0.4
434 1 1 0.3 0.4
435 1 1 0.3 0.4
436 1 1 0.3 0.4
437 1 1 0.3 0.4
438 1 1 0.3 0.4
439 2 2 0.3 0.3
440 1 1 0.3 0.4
441 1 1 0.3 0.4
442 1 2 0.3 0.4
443 1 2 0.3 0.4
444 1 2 0.3 0.4
445 0.5 1 0.2 0.2
446 1 2 0.3 0.4
447 1 1 0.3 0.4
448 2 2 0.3 0.3
449 1 1 0.3 0.4
450 1 1 0.3 0.4
451 2 2 0.5 0.7
452 1 1 0.3 0.4
453 1 1 0.3 0.4
454 1 2 0.4 0.5
455 4 2 1 2
456 1 1 0.3 0.4
457 1 2 0.3 0.4
458 1 2 0.4 0.5
459 2 2 0.4 0.8
460 1 1 0.3 0.4
461 4 2 0.3 0.4
462 1 1 0.3 0.4
463 1 1 0.3 0.4
464 0.5 1 0.2 0.2
465 0.5 1 0.2 0.2
466 1 1 0.3 0.4
467 2 2 0.3 0.5
468 1 1 0.3 0.4
469 1 1 0.3 0.4
470 1 1 0.3 0.4
471 1 1 0.3 0.4
472 3 2 0.9 1
473 1 2 0.3 0.4
474 1 2 0.3 0.4
475 1 1 0.3 0.4
476 1 2 0.3 0.4
477 1 1 0.3 0.4
478 1 2 0.3 0.4
479 1 1 0.3 0.4
480 1 1 0.3 0.4
481 1 2 0.4 0.5
482 2 1 0.3 0.4
483 1 2 0.3 0.4
484 1 1 0.3 0.4
485 2.5 2 0.5 0.8
486 1 1 0.3 0.4
487 2 2 1 1
488 2 2 0.3 0.3
489 2 2 0.3 0.3
490 1 1 0.3 0.4
491 2 2 0.4 0.5
492 1 1 0.3 0.4
493 1 1 0.3 0.4
494 0.5 1 0.2 0.2
495 1 1 0.3 0.4
496 1 1 0.3 0.4
497 1 1 0.3 0.4
498 1 1 0.3 0.4
499 1 1 0.3 0.4
500 1 1 0.3 0.4
501 2 2 1 1
502 1 1 0.3 0.4
503 1 1 0.3 0.4
504 1 1 0.3 0.4
505 1 2 0.4 0.5
506 1 1 0.3 0.4
507 1 1 0.3 0.4
508 1 1 0.3 0.4
509 1 1 0.3 0.4
510 1 1 0.3 0.4
511 1 1 0.3 0.4
512 1 1 0.3 0.4
513 1 1 0.3 0.4
514 1 1 0.3 0.4
515 0.5 1 0.2 0.2
516 1 1 0.3 0.4
517 1 1 0.3 0.4
518 1 1 0.3 0.4
519 1 1 0.3 0.4
520 1 1 0.3 0.4
521 1 1 0.3 0.4
522 1 1 0.3 0.4
523 1 1 0.3 0.4
524 1 1 0.3 0.4
525 1 1 0.3 0.4
526 1 1 0.3 0.4
527 1 1 0.3 0.4
528 1 1 0.3 0.4
529 1 1 0.3 0.4
530 1 1 0.3 0.4
531 1 1 0.3 0.4
532 1 1 0.3 0.4
533 1 1 0.3 0.4
534 1 1 0.3 0.4
535 1 1 0.3 0.4
536 2 2 0.5 0.5
537 2 2 0.5 0.5
538 1 1 0.3 0.4
539 1 2 0.3 0.3
540 1 1 0.3 0.4
541 3 1 0.4 2
542 1 1 0.3 0.4
543 4 2 1 1
544 1 1 0.3 0.4
545 1 1 0.3 0.4
546 1 1 0.3 0.4
547 2 2 0.3 0.4
548 1 1 0.3 0.4
549 1 1 0.3 0.4
550 1 1 0.3 0.4
551 1 1 0.3 0.4
552 1 1 0.3 0.4
553 1 1 0.3 0.4
554 1 1 0.3 0.4
555 1 1 0.3 0.4
556 0.5 1 0.2 0.2
557 1 2 0.3 0.4
558 4 2 2 4
559 2 2 0.4 0.5
560 4 2 2 4
561 1 2 0.3 0.4
562 1 1 0.3 0.4
563 1 1 0.3 0.4
564 1 1 0.3 0.4
565 1 1 0.3 0.4
566 1 2 0.4 0.3
567 1 1 0.3 0.4
568 1 1 0.3 0.4
569 2 2 0.5 0.5
570 1 1 0.3 0.4
571 1 1 0.3 0.4
572 1 1 0.3 0.4
573 1 1 0.3 0.4
574 1 1 0.3 0.4
575 1 1 0.3 0.4
576 1 1 0.3 0.4
577 1 2 0.4 0.3
578 1 1 0.3 0.4
579 1 2 0.4 0.3
580 1 1 0.3 0.4
581 1 1 0.3 0.4
582 1 2 0.4 0.5
583 1 1 0.3 0.4
584 5 4 1 1
585 2 2 0.3 0.3
586 1 1 0.3 0.4
587 1 1 0.3 0.4
588 1 1 0.3 0.4
589 1 2 0.3 0.4
590 1 1 0.3 0.4
591 1 1 0.3 0.4
592 1 1 0.3 0.4
593 1 1 0.3 0.4
594 2 2 0.4 0.5
595 1 1 0.3 0.4
596 1 2 0.3 0.4
597 1 1 0.3 0.4
598 4 2 1 2
599 1 1 0.3 0.4
600 1 2 0.4 0.5
601 1 1 0.3 0.4
602 1 1 0.3 0.4
603 1 1 0.3 0.4
604 1 2 0.3 0.4
605 1 1 0.3 0.4
606 0.5 1 0.2 0.2
607 1 1 0.3 0.4
608 1 1 0.3 0.4
609 1 2 0.3 0.4
610 1 1 0.3 0.4
611 4 2 1 2
612 2 2 0.3 0.3
613 1 1 0.3 0.4
614 1 1 0.3 0.4
615 1 1 0.3 0.4
616 1 1 0.3 0.4
617 2 2 0.3 0.3
618 0.5 1 0.2 0.2
619 1 1 0.3 0.4
620 1 1 0.3 0.4
621 0.5 1 0.2 0.2
622 0.5 1 0.2 0.2
623 1 1 0.3 0.4
624 0.5 1 0.2 0.2
625 1 1 0.3 0.4
626 1 1 0.3 0.4
627 1 1 0.3 0.4
628 1 1 0.3 0.4
629 2 1 0.3 1
630 1 1 0.3 0.4
631 1 1 0.3 0.4
632 1 1 0.3 0.4
633 0.5 1 0.2 0.2
634 2 2 0.3 0.4
635 2 2 0.5 0.5
636 1 1 0.3 0.4
637 1 1 0.3 0.4
638 1 1 0.3 0.4
639 1 1 0.3 0.4
640 1 1 0.3 0.4
641 3 2 0.9 1
642 1 1 0.3 0.4
643 1 2 0.4 0.5
644 2 2 0.3 0.3
645 1 2 0.4 0.3
646 3 2 0.3 0.4
647 4 2 1 1
648 6 2 0.9 0.4
649 1 2 0.3 0.4
650 1 1 0.3 0.4
651 1 2 0.3 0.4
652 1 1 0.3 0.4
653 1 1 0.3 0.4
654 1 1 0.3 0.4
655 1 1 0.3 0.4
656 2 2 0.4 0.5
657 4.9 2 2 4.9
658 1 1 0.3 0.4
659 2 2 0.3 0.3
660 1 1 0.3 0.4
661 1 1 0.3 0.4
662 4 2 0.5 0.5
663 1 1 0.3 0.4
664 4 2 2 4
665 1 2 0.3 0.2
666 1 1 0.2 0.2
667 1 1 0.2 0.2
668 2 2 0.3 0.3
669 1 1 0.2 0.2
670 1 2 0.3 0.2
671 1 1 0.2 0.2
672 1 1 0.2 0.2
673 1 1 0.2 0.2
674 1 1 0.2 0.2
675 1 1 0.2 0.2
676 0.5 1 0.2 0.1
677 0.5 1 0.2 0.1
678 1 1 0.2 0.2
679 0.5 1 0.2 0.1
680 1 1 0.2 0.2
681 0.5 1 0.2 0.1
682 1 1 0.2 0.2
683 1 2 0.3 0.2
684 0.5 1 0.2 0.1
685 2 2 0.3 0.3
686 0.5 1 0.2 0.1
687 0.5 1 0.2 0.1
688 3 2 0.3 0.4
689 0.5 1 0.2 0.1
690 0.5 1 0.2 0.1
691 2 2 0.3 0.3
692 1 1 0.2 0.2
693 1 1 0.2 0.2
694 1 2 0.3 0.2
695 0.5 1 0.2 0.1
696 0.5 1 0.2 0.1
697 1 1 0.2 0.2
698 0.5 1 0.2 0.1
699 0.5 1 0.2 0.1
700 1 1 0.2 0.2
701 0.5 1 0.2 0.1
702 1 1 0.2 0.2
703 0.5 1 0.2 0.1
704 0.5 1 0.2 0.1
705 1 1 0.2 0.2
706 4 2 0.3 0.5
707 1 1 0.2 0.2

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -12,7 +12,7 @@ data class NILConfig(
val verificationThreshold: Int = 70, val verificationThreshold: Int = 70,
val outputFileName: String = "result.csv", val outputFileName: String = "result.csv",
val threads: Int = 0, val threads: Int = 0,
val lang: Language = Language.JAVA, val lang: Language = Language.COMMON,
val isForBigCloneEval: Boolean = false, val isForBigCloneEval: Boolean = false,
val isForMutationInjectionFramework: Boolean = false, val isForMutationInjectionFramework: Boolean = false,
) )
@ -27,7 +27,7 @@ fun parseArgs(args: Array<String>): NILConfig {
var verificationThreshold = 70 var verificationThreshold = 70
var outputFileName: String? = null var outputFileName: String? = null
var threads = 0 var threads = 0
var lang = Language.JAVA var lang = Language.COMMON
var isForBigCloneEval = false var isForBigCloneEval = false
var isForMutationInjectionFramework = false var isForMutationInjectionFramework = false
@ -81,11 +81,11 @@ fun String.toLangOrException(): Language =
when (this.toLowerCase()) { when (this.toLowerCase()) {
"java" -> Language.JAVA "java" -> Language.JAVA
"c" -> Language.C "c" -> Language.C
"cpp" -> Language.CPP "cpp", "c++" -> Language.CPP
"cs", "csharp" -> Language.CS "cs","c#", "csharp" -> Language.CS
"py", "python" -> Language.PYTHON "py","python2", "python3", "python" -> Language.PYTHON
"kt", "kotlin" -> Language.KOTLIN "kt", "kotlin" -> Language.KOTLIN
else -> throw InvalidOptionException("Language $this is invalid.") else -> Language.COMMON
} }
class InvalidOptionException(private val option: String) : RuntimeException() { class InvalidOptionException(private val option: String) : RuntimeException() {
@ -107,5 +107,5 @@ class InvalidOptionException(private val option: String) : RuntimeException() {
} }
enum class Language { enum class Language {
JAVA, CPP, C, CS, PYTHON, KOTLIN COMMON, JAVA, CPP, C, CS, PYTHON, KOTLIN
} }

View File

@ -56,6 +56,7 @@ class NILMain(private val config: NILConfig) {
config.verificationThreshold config.verificationThreshold
) )
if (tokenSequences.size - startIndex - 1 > 0) { if (tokenSequences.size - startIndex - 1 > 0) {
// 对当前位置后的每一个token sequence执行克隆检测的步骤从索引中定位->过滤->验证
Flowable.range(startIndex + 1, tokenSequences.size - startIndex - 1) Flowable.range(startIndex + 1, tokenSequences.size - startIndex - 1)
.parallelIfSpecified(config.threads) .parallelIfSpecified(config.threads)
.runOn(Schedulers.computation()) .runOn(Schedulers.computation())

View File

@ -16,7 +16,8 @@ class InvertedIndex private constructor() {
val invertedIndex = InvertedIndex() val invertedIndex = InvertedIndex()
val endIndex = min(startIndex + partitionSize, tokenSequences.size) val endIndex = min(startIndex + partitionSize, tokenSequences.size)
for (index in startIndex until endIndex) { for (index in startIndex until endIndex) {
val nGrams = tokenSequences[index].toNgrams(gramSize) val nGrams = tokenSequences[index].toNgrams(gramSize) // 当前token sequence对应的ngrams
// 索引中添加元素:<ngram, ngramInfo(出现在哪个序列中,序列中一共有多少ngram)>
nGrams.forEach { invertedIndex.hashTable.getOrPut(it) { mutableListOf() }.add(index to nGrams.size) } nGrams.forEach { invertedIndex.hashTable.getOrPut(it) { mutableListOf() }.add(index to nGrams.size) }
} }
return invertedIndex return invertedIndex

View File

@ -16,6 +16,7 @@ class CustomCloneDetection(
private val th: Int private val th: Int
) : CloneDetection { ) : CloneDetection {
override fun execCustom(id: Id): Flowable<TokenSequencesSimInfo> { override fun execCustom(id: Id): Flowable<TokenSequencesSimInfo> {
// 待对比的token sequence
val nGrams = tokenSequences[id].toNgrams(gramSize) val nGrams = tokenSequences[id].toNgrams(gramSize)
return locatingPhase.locate(nGrams, id) return locatingPhase.locate(nGrams, id)
.filter { filteringPhase.filter(nGrams.size, it) } .filter { filteringPhase.filter(nGrams.size, it) }

View File

@ -3,5 +3,9 @@ package jp.ac.osaka_u.sdl.nil.usecase.cloneDetection
import jp.ac.osaka_u.sdl.nil.entity.NGramInfo import jp.ac.osaka_u.sdl.nil.entity.NGramInfo
interface Filtration { interface Filtration {
/**
* @param nGramSize 当前判断序列的长度
* @param cloneCandidate 可疑克隆源<序列信息交集大小>
*/
fun filter(nGramSize: Int, cloneCandidate: Map.Entry<NGramInfo, Int>): Boolean fun filter(nGramSize: Int, cloneCandidate: Map.Entry<NGramInfo, Int>): Boolean
} }

View File

@ -3,7 +3,7 @@ package jp.ac.osaka_u.sdl.nil.usecase.cloneDetection
import jp.ac.osaka_u.sdl.nil.entity.NGramInfo import jp.ac.osaka_u.sdl.nil.entity.NGramInfo
class NGramBasedFiltration(private val threshold: Int) : Filtration, NGramSimilarity { class NGramBasedFiltration(private val threshold: Int) : Filtration, NGramSimilarity {
// 计算交集ngram的数量取大于阈值的 // 计算交集ngram的数量计算相对两个对比序列的长度,相似度大于阈值的
override fun filter(nGramSize: Int, cloneCandidate: Map.Entry<NGramInfo, Int>): Boolean = override fun filter(nGramSize: Int, cloneCandidate: Map.Entry<NGramInfo, Int>): Boolean =
calcSimilarity(nGramSize, cloneCandidate.key.size, cloneCandidate.value) >= threshold calcSimilarity(nGramSize, cloneCandidate.key.size, cloneCandidate.value) >= threshold
} }

View File

@ -10,8 +10,8 @@ class NGramBasedLocation(private val invertedIndex: InvertedIndex) : Location {
override fun locate(nGrams: NGrams, index: Int): Flowable<Map.Entry<NGramInfo, Int>> = override fun locate(nGrams: NGrams, index: Int): Flowable<Map.Entry<NGramInfo, Int>> =
nGrams.flatMap { invertedIndex[it] } // ngram的每一个在倒排索引中出现的位置的列表 nGrams.flatMap { invertedIndex[it] } // ngram的每一个在倒排索引中出现的位置的列表
.groupingBy { it } .groupingBy { it }
.eachCount() // 每个tokenSequences中出现了多少个ngram与当前nGrams的交集 .eachCount() // <每个序列交集ngram数量>
.asSequence() .asSequence()
.toFlowable() .toFlowable()
.filter { (nGramInfo, _) -> index > nGramInfo.id } // 代表tokenSequence的NGramInfo交集的长度 .filter { (nGramInfo, _) -> index > nGramInfo.id } // 取小于当前id的序列
} }

View File

@ -2,6 +2,7 @@ package jp.ac.osaka_u.sdl.nil.usecase.preprocess
import jp.ac.osaka_u.sdl.nil.Language import jp.ac.osaka_u.sdl.nil.Language
import jp.ac.osaka_u.sdl.nil.NILConfig import jp.ac.osaka_u.sdl.nil.NILConfig
import jp.ac.osaka_u.sdl.nil.usecase.preprocess.common.CommonPreprocess
import jp.ac.osaka_u.sdl.nil.usecase.preprocess.cpp.CPPPreprocess import jp.ac.osaka_u.sdl.nil.usecase.preprocess.cpp.CPPPreprocess
import jp.ac.osaka_u.sdl.nil.usecase.preprocess.cpp.CPreprocess import jp.ac.osaka_u.sdl.nil.usecase.preprocess.cpp.CPreprocess
import jp.ac.osaka_u.sdl.nil.usecase.preprocess.cs.CSharpPreprocess import jp.ac.osaka_u.sdl.nil.usecase.preprocess.cs.CSharpPreprocess
@ -19,6 +20,7 @@ class PreprocessFactory {
Language.CS -> CSharpPreprocess(config) Language.CS -> CSharpPreprocess(config)
Language.PYTHON -> PythonPreprocess(config) Language.PYTHON -> PythonPreprocess(config)
Language.KOTLIN -> KotlinPreprocess(config) Language.KOTLIN -> KotlinPreprocess(config)
else -> {CommonPreprocess(config)}
} }
} }
} }

View File

@ -0,0 +1,114 @@
package jp.ac.osaka_u.sdl.nil.usecase.preprocess.common
import io.reactivex.rxjava3.core.Flowable
import io.reactivex.rxjava3.kotlin.toFlowable
import jp.ac.osaka_u.sdl.nil.NILConfig
import jp.ac.osaka_u.sdl.nil.entity.CodeBlock
import jp.ac.osaka_u.sdl.nil.usecase.preprocess.Preprocess
import java.io.File
class CommonPreprocess(private val config: NILConfig) : Preprocess(config.threads) {
private val textFileSuffix = setOf(
"py",
"h",
"c",
"cpp",
"cc",
"java",
"php",
"html",
"css",
"scss",
"go",
"r",
"graphql",
"swift",
"xml",
"yaml",
"json",
"lua",
"scheme",
"less",
"ini",
"coffee",
"litcoffee",
"js",
"cs",
"kt",
"md",
"sql",
"m",
"mm",
"pas",
"perl",
"ejs",
"pl",
"rb",
"rs",
"rust",
"sh",
"makefile",
"circ",
"readme",
"yml",
"sml",
"conf",
"txt",
"gitignore",
"in",
"cu",
"gemfile",
"scala",
"net",
"l",
"v",
"config",
"properties",
"log",
"htm",
"cnf",
"hex",
"bat",
"asm",
"bash",
"ts",
"tsx",
"sass",
"jsx",
"jsp",
"gitkeep",
"sv",
"hql",
"y",
"jj",
"pls",
"sol",
"ignore",
"ctrl",
"vue",
"tex",
"bib",
"cls",
"bst",
"toc",
"sty",
"g4",
"sy",
"ipynb",
"m",
"mm",
"groovy"
)
override fun collectSourceFiles(dir: File): Flowable<File> =
dir.walk()
.filter { it.isFile }
.filterNot { it.absolutePath.contains("/.") }
.filter { textFileSuffix.contains(it.extension) }
.toFlowable()
override fun collectBlocks(srcFile: File): Flowable<CodeBlock> =
Flowable.just(srcFile)
.flatMap(CommonTransformer(config)::extractBlocks)
}

View File

@ -0,0 +1,57 @@
package jp.ac.osaka_u.sdl.nil.usecase.preprocess.common
import io.reactivex.rxjava3.core.BackpressureStrategy
import io.reactivex.rxjava3.core.Flowable
import io.reactivex.rxjava3.core.Observable
import jp.ac.osaka_u.sdl.nil.NILConfig
import jp.ac.osaka_u.sdl.nil.entity.CodeBlock
import jp.ac.osaka_u.sdl.nil.usecase.preprocess.SymbolSeparator
import java.io.File
import java.io.FileReader
import java.io.StreamTokenizer
import java.math.BigDecimal
class CommonTransformer(private val config: NILConfig) {
fun extractBlocks(sourceFile: File): Flowable<CodeBlock> =
Observable.create<CodeBlock> { emitter ->
val fileName = sourceFile.canonicalPath
val tokens: MutableList<String> = ArrayList()
var endLine = 1
// 读取文件内容整个文件作为一个token序列
val rd = FileReader(sourceFile)
rd.use {
val st = StreamTokenizer(rd)
st.parseNumbers()
st.eolIsSignificant(true)
var token = st.nextToken()
while (token != StreamTokenizer.TT_EOF) {
token = st.nextToken()
when (token) {
StreamTokenizer.TT_NUMBER -> {
val num = st.nval
val bd = BigDecimal(num.toString())
tokens.add(bd.stripTrailingZeros().toPlainString())
}
StreamTokenizer.TT_WORD -> {
val word = st.sval
tokens.add(word)
}
StreamTokenizer.TT_EOL -> endLine++
else -> {}
}
}
}
// 整个token序列加入
if (tokens.size >= config.minToken && endLine >= config.minLine) {
emitter.onNext(CodeBlock(fileName, 1, endLine, SymbolSeparator.separate(tokens)))
}
emitter.onComplete()
}.toFlowable(BackpressureStrategy.BUFFER)
}

View File

@ -0,0 +1,16 @@
该项技术重点解决课程知识图谱自动化生成问题,涵盖知识抽取、知识融合、知识推理、知识加工以及知识呈现等多项技术。
a知识抽取
知识抽取是构建知识图谱的第一步,主要从各种类型的数据源中提取出实体(概念)、属性以及实体间的相互关系。
b知识融合
在获得新知识后,需要对其进行整合,以消除矛盾和歧义。比如,某些实体可能有多种表达,某个特定称谓可能对应于不同的实体等。这个过程称为知识融合,其目的是将不同来源的知识进行整合,形成一个统一、一致的知识库。
c知识推理
知识推理主要用于发现新的事实、关系、公理和规则等。知识推理可以通过多种方法实现,包括基于逻辑规则的推理、基于图结构的推理、基于分布式表示学习的推理、基于神经网络的推理以及混合推理等。
具体来说,知识推理的基础任务主要包括知识补全、知识纠错和推理问答等。以知识补全为例,通过算法可以补全知识图谱中缺失的属性或者关系,提升知识图谱的完备性。比如,可以利用归纳推理的方法,根据以往的经验分析和先验知识构建概率模型,对推理假设进行验证或推测。另外,基于图结构的推理可以利用图算法来挖掘实体间的关系,进而发现新的知识。
d知识加工
对于经过融合的新知识,还需要进行质量评估,才能将合格的部分加入到知识库中,以确保知识库的质量。
这个过程可以包括人工参与甄别,也可以利用自动化算法进行筛选。新增数据后,可以进行知识推理、拓展现有知识,得到新知识。
e知识图谱展示
知识图谱展示是将知识图谱中的实体、关系、属性等以图形化的方式展现出来,帮助用户更直观地理解和应用知识。
结合这个评价,对上述内容进行扩展,用三段话进行描述,业务场景为基础业务能力实训保障系统:
描述不能太口语化,技术路线应该是聚焦为啥用这个技术,有什么优势,解决什么场景问题,而不是介绍技术概念。

69
聊天记忆.html Normal file
View File

@ -0,0 +1,69 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>智能助手</title>
<script>
let conversationId = ""; // 初始化conversation_id
// 定义API请求函数
async function sendRequest(type, inputMarkdown) {
// 构造请求体包含conversation_id
const requestBody = {
query: inputMarkdown,
inputs: {"description": "生成杨辉三角", type: type},
response_mode: "blocking",
conversation_id: conversationId,
user: "user_id", // 请替换为实际的用户ID
files: []
};
const response = await fetch('https://ai-data.educoder.net/v1/chat-messages', {
method: "POST",
headers: {
'Content-Type': 'application/json',
// 请替换为实际有效的认证令牌
'Authorization': 'Bearer app-Z8HFAfducmnrr3zO9961jqgB'
},
body: JSON.stringify(requestBody)
});
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}
const data = await response.json();
if (data && data.answer) {
document.getElementById('outputMarkdown').value = data.answer;
} else {
document.getElementById('outputMarkdown').value = "未获取到有效回答";
}
// 从响应中提取conversation_id并保存
if (data && data.conversation_id) {
conversationId = data.conversation_id;
}
}
// 定义按钮点击事件
function onButtonClick(type) {
const inputMarkdown = document.getElementById('inputMarkdown').value;
sendRequest(type, inputMarkdown);
}
function onSubmit() {
const inputMarkdown = document.getElementById('inputMarkdown').value;
sendRequest(2, inputMarkdown); // 假设type=2为普通问答
}
</script>
</head>
<body>
<h1>智能助手</h1>
<textarea id="inputMarkdown" rows="4" cols="50" placeholder="请输入您的问题..."></textarea><br>
<button onclick="onButtonClick(0)">智能审题</button>
<button onclick="onButtonClick(1)">代码纠错</button>
<button onclick="onSubmit()">提交问题</button>
<br>
<textarea id="outputMarkdown" rows="4" cols="50" readonly></textarea>
</body>
</html>