/translate-extract
Extract all Fitzgerald quotes from the metaphor analysis essay with chapter references.
Purpose
Create a structured registry of all direct Fitzgerald quotes used in analysis.md, enabling accurate lookup of official translations in the subsequent pipeline phase.
Input
- •
mip-analysis/essay/analysis.md— Main essay containing embedded Fitzgerald quotes
Output
- •
translations/quote-registry.json— Structured quote registry
Output Format
json
{
"metadata": {
"source_file": "mip-analysis/essay/analysis.md",
"extraction_date": "YYYY-MM-DD",
"quote_count": <number>
},
"quotes": [
{
"id": "Q001",
"text": "exact quote text",
"chapter": 1,
"citation": "(Fitzgerald, Ch. 1)",
"context": "surrounding sentence or phrase for disambiguation",
"section": "essay section where quote appears"
}
]
}
Extraction Rules
- •Identify quotes: Look for text in double quotes followed by
(Fitzgerald, Ch. X) - •Preserve exact text: Include all punctuation, ellipses, and formatting
- •Record chapter: Parse the chapter number from the citation
- •Capture context: Include 10-20 words before the quote for disambiguation
- •Note section: Record which essay section (Introduction, DESIRE IS LIGHT, etc.)
Execution Steps
- •Read
mip-analysis/essay/analysis.md - •Parse all Fitzgerald quotes using pattern:
"[^"]+" \(Fitzgerald, Ch\. \d\) - •For each quote:
- •Extract exact text (including internal punctuation)
- •Parse chapter number
- •Capture surrounding context
- •Identify essay section
- •Generate sequential IDs (Q001, Q002, ...)
- •Write structured JSON to
translations/quote-registry.json
Verification
After extraction, report:
- •Total quote count
- •Distribution by chapter
- •Any quotes with ambiguous chapter references