3.5만 에피소드 기반 표절·AI·판례 분석 파이프라인 구현
This commit is contained in:
1 parent
4f6898d0b2
commit
ce50e89089
32 files changed
+4505
-69
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import pytest
|
||||
|
||||
from app.engine.source_extraction import chunk_with_offsets
|
||||
|
||||
|
||||
def test_chunk_offsets_and_overlap_are_exact():
|
||||
text = "가" * 1200
|
||||
chunks = list(chunk_with_offsets(text, size=500, stride=250))
|
||||
assert chunks[0] == (0, 500, text[0:500])
|
||||
assert chunks[1] == (250, 750, text[250:750])
|
||||
assert chunks[-1][1] == len(text)
|
||||
|
||||
|
||||
def test_chunk_parameters_must_be_positive():
|
||||
with pytest.raises(ValueError):
|
||||
list(chunk_with_offsets("본문", size=0, stride=1))
|
||||
Reference in new issue
Block a user