Files
TheLadder/tools/story-to-pack/probe/nobody/claude/groups_src.py
T
JesseMarkowitzandClaude Opus 5.5 3a4758172d 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
2026-10-07 06:05:51 -04:00

229 lines
20 KiB
Python

"""Hand-built reference grouping of the Diary of a Nobody predicaments (Claude-written, no inference).
The book is one continuous diary, so its 23 "stories" are chapters of one life. A group counts as recurring
only if its scenes come from at least three chapters that are pairwise NOT consecutive (for example 3, 9
and 17, not 4, 5 and 6), so that one incident running over a chapter break is not mistaken for recurrence.
Every group also meets the catalogue rule: at least 5 scenes and no chapter over half the members.
Each scene is in at most one group; scenes that fit no recurring situation stay unassigned.
Options follow DESIGN.md: 3-5 per group, each marked by where it came from --
'archetype' a fixed, setting-free option
'scene:N' what someone in scene N actually did (or refused to do)
'filled' written to fill a gap the scenes leave
The narrator is unreliable about his own dignity, so a 'scene:N' option is what he actually did, not
what he says it amounted to; and each group carries at least one move a man with more sense of
proportion would make, marked 'filled' where nobody in the book makes it.
`moves` names spine paths and a direction only (+ / - / risk / set). No magnitudes: the model never
chooses a number. Skill labels proposed for this corpus: composure (keeping temper and dignity when
slighted, and not needing the last word), tact (saying the right thing to the people above and below
you, and knowing when to say nothing).
Relationship roles are generic: employer, juniors (younger colleagues), spouse, child, friends (old
friends), tradesmen, servants, guests, host, betters (social superiors), acquaintance, family.
"""
G = [
# ---- work -------------------------------------------------------------------------------------------
dict(id='G01', name='Cheeked by younger colleagues',
predicament='Younger colleagues with a fraction of your service answer you with cheek and laugh behind your back, and the employer may be watching.',
actor='long-serving senior', wants='respect from the juniors', counterpart='cheeky younger colleagues',
members=[6, 7, 19, 36, 108],
options=[
('Remind them how many years you have served, and demand respect.', 'scene:6', {'relationships.juniors':'-', 'standing':'risk'}),
('Give them a look and say nothing.', 'scene:7', {'composure':'+', 'standing':'-'}),
('Threaten to report them to the employer.', 'scene:19', {'relationships.juniors':'risk', 'relationships.employer':'risk'}),
('Buy the clothes they wear, so they have less to laugh at.', 'scene:36', {'money':'-', 'standing':'risk'}),
('Laugh at yourself before they can, and get on with the work.', 'filled', {'tact':'+', 'relationships.juniors':'+'})]),
dict(id='G02', name='A reward at work, and what it does at home',
predicament='After years of steady service the employer singles you out for an honour or a rise, and how you carry it home decides what it is worth.',
actor='long-serving man', wants='to be recognised', counterpart='the employer',
members=[21, 22, 87, 88, 90, 154, 155],
options=[
('Tell everyone at once, and send out for the good wine.', 'scene:90', {'money':'-', 'standing':'+', 'relationships.spouse':'+'}),
('Ask the employer how to conduct yourself, and do exactly as told.', 'scene:22', {'relationships.employer':'+', 'tact':'+'}),
('Go and ask the employer what the reward is to be.', 'scene:88', {'relationships.employer':'risk'}),
('Let your thanks go unspoken; he can see them.', 'scene:155', {'relationships.employer':'+'}),
('Bank the rise and change nothing at home.', 'filled', {'money':'+', 'composure':'+'})]),
# ---- the people who serve you ------------------------------------------------------------------------
dict(id='G03', name='Tradesmen and servants who show you no deference',
predicament='A tradesman or a servant treats you as no better than they are, and you must decide how much respect to insist on.',
actor='respectable householder', wants='the deference due to him', counterpart='tradesmen and servants',
members=[3, 5, 12, 23, 25, 27, 30, 33, 48, 53, 92, 115, 142],
options=[
('Stand on your dignity and take your custom elsewhere.', 'scene:3', {'relationships.tradesmen':'-', 'money':'risk'}),
('Lose your temper and box their ears.', 'scene:23', {'composure':'-', 'standing':'-', 'flags.lost_temper':'set'}),
('Declare you are master here and send them about their business.', 'scene:53', {'relationships.servants':'-', 'standing':'+'}),
('Pay what they ask, and call it a robbery.', 'scene:33', {'money':'-', 'relationships.tradesmen':'-'}),
('Be civil and firm, and let the familiarity pass.', 'filled', {'composure':'+', 'tact':'+'})]),
# ---- old friends -----------------------------------------------------------------------------------
dict(id='G04', name='A falling-out with an old friend',
predicament='You and an old friend have fallen out, over a slight, a neglect or a liberty, and one of you will have to make the first move.',
actor='old friend', wants='the friendship back, on his own terms', counterpart='an aggrieved old friend',
members=[10, 11, 31, 32, 93, 94, 95, 96, 97, 116, 149],
options=[
('Write a letter so carefully worded that it apologises for you.', 'scene:11', {'relationships.friends':'+', 'standing':'-'}),
('Send a costly peace offering.', 'scene:32', {'money':'-', 'relationships.friends':'+'}),
('Say nothing, and wait for them to come to you.', 'scene:10', {'composure':'+', 'relationships.friends':'-'}),
('Take their flimsy excuse and laugh it off.', 'scene:97', {'relationships.friends':'+', 'tact':'+'}),
('Say plainly, once, what hurt you, and let it go.', 'filled', {'relationships.friends':'risk', 'composure':'+'})]),
dict(id='G05', name='Old friends who make free with your home',
predicament='Old friends treat your home, your table and your good nature as their own, and bring their jokes and their acquaintances with them.',
actor='householder', wants='to be treated as a host, not a convenience', counterpart='old friends who take liberties',
members=[1, 43, 66, 68, 70, 84, 109, 143],
options=[
('Keep open house and put up with it.', 'scene:68', {'money':'-', 'relationships.friends':'+', 'standing':'-'}),
('Speak your mind to the friend who brought the stranger.', 'scene:70', {'relationships.friends':'-', 'standing':'+'}),
('Tell them pointedly that you are engaged tomorrow.', 'scene:69', {'tact':'+', 'relationships.guests':'-'}),
('Threaten to end the evening if they cannot behave.', 'scene:143', {'relationships.friends':'-', 'flags.put_foot_down':'set'}),
('Laugh with them, and let them be the hosts next time.', 'filled', {'relationships.friends':'+', 'money':'+', 'tact':'+'})]),
# ---- dignity ---------------------------------------------------------------------------------------
dict(id='G06', name='A joke nobody laughs at',
predicament='You have thought of a joke you are sure is excellent, and the people you tell it to are busy, touchy or not listening.',
actor='would-be wit', wants='a laugh', counterpart='family and friends',
members=[8, 9, 18, 89, 120, 144],
options=[
('Tell it, and laugh loud enough for everyone.', 'scene:18', {'relationships.friends':'risk', 'standing':'-'}),
('Repeat it, in case they missed it.', 'scene:89', {'relationships.child':'-', 'tact':'-'}),
('Enjoy it privately, and write it down.', 'scene:8', {'composure':'+'}),
('Take the silence in good part and sit out.', 'scene:144', {'standing':'-', 'relationships.friends':'+'}),
('Keep it to yourself: the moment is wrong.', 'filled', {'tact':'+', 'relationships.spouse':'+'})]),
dict(id='G07', name='A mishap at the very moment of dignity',
predicament='Just as you mean to impress or rebuke someone, a small accident of your own making turns you into the joke.',
actor='man on his dignity', wants='to be taken seriously', counterpart='the onlookers',
members=[4, 16, 47, 51, 71, 76],
options=[
('Carry on with your speech as if nothing had happened.', 'scene:47', {'composure':'+', 'standing':'-'}),
('Give up the moment rather than face them looking foolish.', 'scene:71', {'standing':'-', 'relationships.betters':'-'}),
('Pay for the damage, to show you are a gentleman.', 'scene:76', {'money':'-', 'standing':'+'}),
('Write a cutting letter about it afterwards.', 'scene:16', {'standing':'-', 'flags.cutting_letter':'set'}),
('Laugh at yourself first.', 'filled', {'composure':'+', 'standing':'+', 'tact':'+'})]),
# ---- keeping up appearances ------------------------------------------------------------------------
dict(id='G08', name='Keeping up appearances on a small income',
predicament='The people you want to keep up with spend and dress as you cannot afford to, and there is a cheap way to seem as if you can.',
actor='householder of modest means', wants='to look respectable', counterpart='fashionable friends and acquaintances',
members=[13, 37, 62, 77, 110],
options=[
('Say you despise such things, which is cheaper than having them.', 'scene:13', {'money':'+', 'standing':'risk', 'flags.proud_of_plainness':'set'}),
('Decline the invitation, and call it a dislike of society.', 'scene:62', {'money':'+', 'relationships.acquaintance':'-'}),
('Buy the finery to keep up.', 'scene:37', {'money':'-', 'standing':'+'}),
('Doctor the price so the present looks dearer.', 'scene:77', {'standing':'+', 'flags.faked_it':'set'}),
('Live plainly and say so without apology.', 'filled', {'composure':'+', 'standing':'-', 'money':'+'})]),
dict(id='G09', name='Playing the host beyond your means',
predicament='You want to play the generous host, or treat someone who matters, and your purse, your house or your arrangements are not up to it.',
actor='would-be host', wants='to treat them handsomely', counterpart='the guests he wants to impress',
members=[14, 15, 34, 60, 112, 113, 114],
options=[
('Rely on a favour promised by a new acquaintance.', 'scene:14', {'money':'+', 'standing':'risk'}),
('Invite them home on the spur of the moment, and improvise.', 'scene:34', {'relationships.spouse':'-', 'standing':'risk'}),
('Help everyone lavishly, and trust that it is all provided.', 'scene:112', {'money':'risk', 'relationships.guests':'+'}),
('Pay what you must, and hide the damage from your wife.', 'scene:114', {'money':'-', 'relationships.spouse':'+', 'flags.hid_the_bill':'set'}),
('Offer a plain evening you can afford, and say so.', 'filled', {'tact':'+', 'money':'+', 'standing':'-'})]),
dict(id='G10', name='Out of your depth among your betters',
predicament='You are a guest among people above your station, you know nobody, and every remark you make seems to be the wrong one.',
actor='modest guest', wants='to pass muster', counterpart='grander hosts and guests',
members=[24, 111, 118, 119, 121, 123, 124, 151],
options=[
('Accept every invitation from above: you cannot afford to offend.', 'scene:123', {'relationships.betters':'+', 'money':'-'}),
('Arrive late, to seem fashionable.', 'scene:111', {'standing':'risk'}),
('Make conversation about what is in front of you, and hope it lands.', 'scene:119', {'tact':'-', 'relationships.host':'-'}),
('Stay close to your wife and say little.', 'scene:24', {'relationships.spouse':'+', 'composure':'+'}),
('Ask your host about his things before you give opinions on them.', 'filled', {'tact':'+', 'relationships.host':'+'})]),
dict(id='G11', name='Told your steady life is mediocre',
predicament='Someone cleverer or richer tells you that your safe, respectable, modest life is the mark of a nobody.',
actor='contented man', wants='to think his life worthwhile', counterpart='brilliant or wealthy scorners',
members=[72, 125, 126, 128, 136, 148, 153],
options=[
('Say you are not competent to offer an opinion.', 'scene:126', {'standing':'-', 'composure':'+'}),
('Refuse, in writing, to be drawn into the argument.', 'scene:69', {'composure':'+', 'relationships.acquaintance':'-'}),
('Tell yourself you are happy because you are not ambitious.', 'scene:128', {'composure':'+', 'flags.content':'set'}),
('Wonder, for once, whether money is fairly shared.', 'scene:153', {'flags.doubts':'set'}),
('Answer that a steady life is a choice, and say why.', 'filled', {'standing':'+', 'tact':'+'})]),
# ---- home ------------------------------------------------------------------------------------------
dict(id='G12', name='A tiff at home',
predicament='You and your wife have flared up over something small, and each of you is sure the other started it.',
actor='husband', wants='peace, and to be in the right', counterpart='his wife',
members=[2, 17, 26, 28, 29, 35, 61, 86],
options=[
('Insist you were in the right, calmly and at length.', 'scene:29', {'relationships.spouse':'-', 'standing':'risk'}),
('Dine out, and leave a peace offering on her table.', 'scene:35', {'money':'-', 'relationships.spouse':'+'}),
('Say it is merely a matter of taste.', 'scene:17', {'relationships.spouse':'-'}),
('Hold your tongue and let it pass.', 'archetype', {'composure':'+', 'relationships.spouse':'+'}),
('Admit you drank more than you meant, and apologise.', 'filled', {'relationships.spouse':'+', 'standing':'-'})]),
dict(id='G13', name='Nobody at home takes you seriously',
predicament='Your wife, your son and your friends have stopped taking you seriously, and your opinions and pastimes are laughed at in your own house.',
actor='head of the household', wants='to be listened to', counterpart='his family',
members=[42, 74, 75, 122, 139, 140, 147],
options=[
('Declare that you are master in this house.', 'scene:147', {'standing':'risk', 'relationships.spouse':'-', 'flags.put_foot_down':'set'}),
('Vow never to mention it again.', 'scene:122', {'relationships.family':'-', 'composure':'-'}),
('Refuse to take part, and sit somewhere else.', 'scene:140', {'relationships.spouse':'-'}),
('Give way, and treat them as they want to be treated.', 'scene:42', {'relationships.child':'+', 'standing':'-'}),
('Join in for once, on their terms.', 'scene:141', {'relationships.spouse':'+', 'composure':'+'})]),
# ---- the grown son ---------------------------------------------------------------------------------
dict(id='G14', name='A grown son who looks down on your life',
predicament='Your grown son sneers at your name, your friends, your employer and your house, and still lives under your roof.',
actor='father', wants="his son's respect", counterpart='a scornful grown son',
members=[38, 39, 50, 55, 63, 78, 81, 132, 135, 150],
options=[
('Tell him plainly that beggars cannot be choosers.', 'scene:50', {'relationships.child':'-', 'standing':'+'}),
('Leave the room with silent dignity.', 'scene:78', {'composure':'+', 'relationships.child':'-'}),
('Say nothing, for fear of setting him off.', 'scene:38', {'relationships.child':'+', 'standing':'-'}),
('Let his mother put him in his place.', 'scene:81', {'relationships.spouse':'+', 'tact':'+'}),
('Defend your employer and your friends to his face.', 'filled', {'relationships.employer':'+', 'relationships.child':'risk', 'standing':'+'})]),
dict(id='G15', name="A grown son's unwise match",
predicament='Your grown son has set his heart on someone you think wrong for him, and every word you say against it binds him closer.',
actor='father', wants='his son safely matched', counterpart='a son in love, and the one he loves',
members=[54, 56, 64, 100, 152, 156],
options=[
('Tell him exactly what you think of the match.', 'scene:56', {'relationships.child':'-', 'flags.spoke_against_match':'set'}),
('Keep your dismay to yourself and be civil to them.', 'scene:54', {'composure':'+', 'relationships.child':'+'}),
('Write him a stern warning about his conduct.', 'scene:156', {'relationships.child':'risk', 'standing':'+'}),
('Let him find out for himself.', 'archetype', {'relationships.child':'+', 'composure':'+'})]),
dict(id='G16', name='Placing a son who throws his places away',
predicament='Your grown son has lost another post, and the only way to place him again is to spend your own good name with people who matter.',
actor='father with a steady record', wants='his son settled', counterpart='the employer and other firms',
members=[40, 44, 49, 98, 105, 106, 107],
options=[
('Write to every firm you know.', 'scene:44', {'standing':'risk'}),
('Ask your own employer to take him on.', 'scene:105', {'relationships.employer':'risk', 'relationships.child':'+', 'flags.vouched_for_son':'set'}),
('Confide your worries about him to the employer.', 'scene:98', {'relationships.employer':'+', 'standing':'-'}),
('Order him to withdraw his resignation and apologise.', 'scene:40', {'relationships.child':'-', 'standing':'+'}),
('Leave him to find his own place.', 'filled', {'relationships.child':'-', 'relationships.employer':'+', 'money':'-'})]),
dict(id='G17', name='Left to answer for your son',
predicament='Your grown son has wronged or embarrassed someone, and it falls to you to face them, explain him or disown him.',
actor='father', wants='to keep his own good name', counterpart='the people his son has wronged',
members=[41, 85, 103, 129, 130, 131, 134, 137],
options=[
('Change the subject.', 'scene:41', {'tact':'+', 'relationships.friends':'-'}),
('Keep the complaint to yourself.', 'scene:85', {'relationships.spouse':'risk', 'composure':'+'}),
('Disown what he did, in writing.', 'scene:131', {'relationships.employer':'+', 'relationships.child':'-'}),
('Console the injured party yourself.', 'scene:103', {'money':'-', 'relationships.friends':'+'}),
('Defend him: he is only a boy.', 'filled', {'relationships.child':'+', 'relationships.employer':'-', 'standing':'-'})]),
dict(id='G18', name="Your son's fast money",
predicament='Your grown son has found an easy road to money, and wants you to spend, invest or rejoice on the strength of it.',
actor='careful father', wants='to keep what he has', counterpart='a son with a sure thing',
members=[57, 91, 99, 101, 102],
options=[
('Put your savings in on his tip.', 'scene:101', {'money':'risk', 'relationships.child':'+'}),
('Let him pay for the show, and worry quietly.', 'scene:57', {'standing':'risk', 'relationships.child':'+'}),
('Tell him to his face that speculation is horrifying.', 'scene:91', {'relationships.child':'-', 'composure':'+'}),
('Ask what he has risked himself before you risk a penny.', 'filled', {'tact':'+', 'money':'+'})]),
dict(id='G19', name="Your son's friends take over your home",
predicament="Your grown son's young friends have taken over your home with their own jokes and manners, and treat you as a fossil in your own chair.",
actor='householder and father', wants='his house back', counterpart="his son's set",
members=[52, 58, 59, 65, 67, 69, 73, 82],
options=[
('Drop hints that it is late, and wait.', 'scene:52', {'composure':'+', 'standing':'-'}),
('Rise and insist the foolery stops at once.', 'scene:82', {'standing':'risk', 'relationships.child':'-', 'flags.put_foot_down':'set'}),
('Ask them to stay to supper, to keep your son at home.', 'scene:65', {'money':'-', 'relationships.child':'+'}),
('Show your son what his friend wrote of you, and expect him to take your side.', 'scene:73', {'relationships.child':'risk'}),
('Leave the young ones to it and see your own friends elsewhere.', 'filled', {'tact':'+', 'relationships.child':'+', 'standing':'-'})]),
]
# Protagonist standing by chapter (story index = chapter - 1), for stage assignment (DESIGN.md "Stages").
# Per chapter, not per scene: a coarse first cut, and the one place this grouping uses a judgement not in the text.
STANDING = {0:'low', 1:'low', 2:'low', 3:'low', 4:'low', 5:'low', 6:'low', 7:'low', 8:'low', 9:'low',
10:'low', 11:'low', 12:'low', 13:'middle', 14:'middle', 15:'middle', 16:'middle', 17:'middle',
18:'middle', 19:'middle', 20:'middle', 21:'middle', 22:'middle'}
# Chapters 1-13: a clerk of twenty years' standing, below the senior clerks, whom the newest junior
# cheeks: low. Chapter 14 opens with his promotion to senior clerk and a £100 rise; from there to the
# end he is middle. Nobody ranks high: the principal, Mr Perkupp, is never the protagonist, and the
# house he gives Pooter in the last chapter is a reward, not a rise in rank.