Skip to content

Commit

Permalink
testng Kveta on all the poems from CCV
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmarecek committed Sep 19, 2024
1 parent 2cc926a commit 83a9dc2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions kveta/test_kveta_on_ccv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import os
import json
import kveta

DATADIR = "/net/projects/EduPo/data/KCV_komplet/ccv/"

for fname in sorted(os.listdir(DATADIR)):
if os.path.isfile(DATADIR+fname) and fname.endswith(".json"):
f = open(DATADIR+fname)
data = json.load(f)
print("Testuji soubor", fname, flush=True)
text = ""
for i in range(len(data[0]["body"])):
for j in range(len(data[0]["body"][i])):
text += data[0]["body"][i][j]["text"] + "\n"
text += "\n"
kveta.okvetuj(text)





0 comments on commit 83a9dc2

Please sign in to comment.