story-to-pack: add the corpora and the catalogue v2/v3
Fourteen corpora split and classified: aesop, bierce, chekhov, holmes, keefe, lawson, lorimer, maupassant, nobody, plaintales, poe, torchy, wallingford and winesburg, each with its splitter and the hand-written groups and pages; catalogue v2 and v3; and the shared splitters gutenberg_chunks.py, se_split.py and se_build.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019rwKTmug58sEsJ72AuWsEi
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
e5617b86ba
commit
3a4758172d
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Print a range of scenes for reading. Usage: dump.py <first_chunk> <last_chunk>"""
|
||||
import json, sys
|
||||
chunks = json.load(open(__file__.rsplit('/',1)[0] + '/chunks.json'))
|
||||
a, b = int(sys.argv[1]), int(sys.argv[2])
|
||||
cur = None
|
||||
for i in range(a, min(b + 1, len(chunks))):
|
||||
c = chunks[i]
|
||||
if c['story'] != cur:
|
||||
cur = c['story']
|
||||
print(f"\n########## STORY {cur}: {c['title']} ##########")
|
||||
print(f"\n----- scene {i} (story {cur}) -----")
|
||||
print(c['text'].strip())
|
||||
Reference in New Issue
Block a user