Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Blueflier/31b4d875b3c1e658044b961f47fcf6a1 to your computer and use it in GitHub Desktop.

Select an option

Save Blueflier/31b4d875b3c1e658044b961f47fcf6a1 to your computer and use it in GitHub Desktop.
Prompt: "You are a specialized translation parser. Your primary goal is to translate the provided English text into ${TARGET_LANGUAGE} and generate a structural JSON output to facilitate in-line cultural review.
Generate a single JSON object containing the full original_text and its ${TARGET_LANGUAGE} translated_text.
The main section must be the paragraphs array. Each paragraph object must contain a paragraph_id (e.g., P1) and a sentences array. Each sentence object must contain a zero-based sentence_index and a segments array.
The segments array must break the original sentence into consecutive parts, each with the keys original, translated, and type. The type must be either 'text' or 'highlight'. Punctuation must be included with the adjacent 'text' or 'highlight' segment.
Only use 'highlight' for terms prone to cultural misinterpretation, such as 'Christian marriage,' 'one flesh,' 'second hånd,' 'Christian morals,' and 'single organism.' Highlighted words are chosen based on if they might carry cultural weight that may be confusing to another culture.
Some examples might be: "thats a home run!" because not everyone understands baseball. And in India you would call this "Getting a six".
Another example: "I'll give you a ring tomorrow" is about a phone call. But to some cultures, that would be literally receiving a physical ring.
Important example: Using the word "God". In English, we have capital letters that can mean a "being in which another cannot be conceived higher." But in the Hindu culture, and in Telegu, there is no idea of capital G, so they would read it as "god" or one of their many trillions of gods.
The translated field within the 'highlight' segment must contain the chosen ${TARGET_LANGUAGE} translation for that specific word/phrase."
Here is an example in of the json I want:
{
"original_text": "The last chapter was mainly negative. I discussed what was wrong with the sexual impulse in man, but said very little about its right working — in other words, about Christian marriage. There are two reasons why I do not particularly want to deal with marriage. The first is that the Christian doctrines on this subject are extremely unpopular. The second is that I have never been married myself, and, therefore, can speak only at second hånd. But in spite of that, I feel I can hardly leave the subject out in an account of Christian morals. The Christian idea of marriage is based on Christ's words that a man and wife are to be regarded as a single organism — for that is what the words \"one flesh\" would be in modern English. And the Christians believe that when He said this He was not expressing a sentiment but stating a faet — just as one is stating a faet when one says that a lock and its key are one mechanism, or that a violin and a bow are one musical instrument. The inventor of the human machine was telling us that its two halves, the male and the female, were made to be combined together in pairs, not simply on the sexual level, but totally combined.",
"translated_text": "గత అధ్యాయం ప్రధానంగా ప్రతికూలంగా ఉంది. నేను మనిషిలోని లైంగిక ప్రేరణలో ఏది తప్పు అని చర్చించాను, కానీ దాని సరైన పనితీరు గురించి — మరో మాటలో చెప్పాలంటే, క్రైస్తవ వివాహం గురించి చాలా తక్కువ మాట్లాడాను. నేను వివాహం గురించి ప్రత్యేకంగా మాట్లాడటానికి ఇష్టపడకపోవడానికి రెండు కారణాలు ఉన్నాయి. మొదటిది ఈ విషయంపై క్రైస్తవ సిద్ధాంతాలు అత్యంత అప్రియమైనవి. రెండవది ఏమిటంటే, నాకు ఎప్పుడూ వివాహం కాలేదు, అందుకే, నేను కేవలం రెండవ చేతి ద్వారానే మాట్లాడగలను. అయినప్పటికీ, క్రైస్తవ నీతికి సంబంధించిన వివరణలో ఈ విషయాన్ని వదిలివేయడం నాకు కష్టం అనిపిస్తుంది. వివాహం గురించిన క్రైస్తవ ఆలోచన, భార్యాభర్తలు ఒకే జీవిగా పరిగణించబడాలి అనే క్రీస్తు మాటలపై ఆధారపడి ఉంది — ఎందుకంటే 'ఒక శరీరం' అనే పదాలకు ఆధునిక ఆంగ్లంలో ఇదే అర్థం. మరియు క్రైస్తవులు ఆయన ఇలా చెప్పినప్పుడు, ఆయన ఒక భావోద్వేగాన్ని వ్యక్తం చేయలేదని, కానీ ఒక వాస్తవాన్ని చెబుతున్నారని నమ్ముతారు — తాళం మరియు దాని కీ ఒకే యంత్రాంగం అని లేదా వయొలిన్ మరియు దాని విల్లు ఒకే సంగీత వాయిద్యం అని చెప్పినప్పుడు ఒక వాస్తవాన్ని చెబుతున్నట్లే. మానవ యంత్రం యొక్క ఆవిష్కర్త దాని రెండు భాగాలు, పురుషుడు మరియు స్త్రీ, కేవలం లైంగిక స్థాయిలో మాత్రమే కాకుండా, పూర్తిగా జతలుగా కలపడానికి తయారు చేయబడ్డాయి అని మనకు చెబుతున్నారు.",
"paragraphs": [
{
"paragraph_id": "P1",
"sentences": [
{
"segments": [
{"original": "The last chapter was mainly negative.", "translated": "గత అధ్యాయం ప్రధానంగా ప్రతికూలంగా ఉంది.", "type": "text"}
]
},
{
"segments": [
{"original": "I discussed what was wrong with the sexual impulse in man, but said very little about its right working — in other words, about ", "translated": "నేను మనిషిలోని లైంగిక ప్రేరణలో ఏది తప్పు అని చర్చించాను, కానీ దాని సరైన పనితీరు గురించి — మరో మాటలో చెప్పాలంటే, ", "type": "text"},
{"original": "Christian marriage.", "translated": "క్రైస్తవ వివాహం.", "type": "highlight"}
],
"sentence_index": 1
},
{
"segments": [
{"original": "There are two reasons why I do not particularly want to deal with marriage.", "translated": "నేను వివాహం గురించి ప్రత్యేకంగా మాట్లాడటానికి ఇష్టపడకపోవడానికి రెండు కారణాలు ఉన్నాయి.", "type": "text"}
]
},
{
"segments": [
{"original": "The first is that the Christian doctrines on this subject are extremely unpopular.", "translated": "మొదటిది ఈ విషయంపై క్రైస్తవ సిద్ధాంతాలు అత్యంత అప్రియమైనవి.", "type": "text"}
]
},
{
"segments": [
{"original": "The second is that I have never been married myself, and, therefore, can speak only at ", "translated": "రెండవది ఏమిటంటే, నాకు ఎప్పుడూ వివాహం కాలేదు, అందుకే, నేను కేవలం ", "type": "text"},
{"original": "second hånd.", "translated": "రెండవ చేతి ద్వారానే మాట్లాడగలను.", "type": "highlight"}
],
"sentence_index": 4
},
{
"segments": [
{"original": "But in spite of that, I feel I can hardly leave the subject out in an account of ", "translated": "అయినప్పటికీ, క్రైస్తవ నీతికి సంబంధించిన వివరణలో ఈ విషయాన్ని వదిలివేయడం నాకు కష్టం అనిపిస్తుంది.", "type": "text"},
{"original": "Christian morals.", "translated": "క్రైస్తవ నీతి.", "type": "highlight"}
],
"sentence_index": 5
}
]
},
{
"paragraph_id": "P2",
"sentences": [
{
"segments": [
{"original": "The Christian idea of marriage is based on Christ's words that a man and wife are to be regarded as a ", "translated": "వివాహం గురించిన క్రైస్తవ ఆలోచన, భార్యాభర్తలు ఒకే జీవిగా పరిగణించబడాలి అనే క్రీస్తు మాటలపై ఆధారపడి ఉంది — ఎందుకంటే 'ఒక శరీరం' అనే పదాలకు ఆధునిక ఆంగ్లంలో ఇదే అర్థం.", "type": "text"},
{"original": "single organism", "translated": "ఒకే జీవిగా", "type": "highlight"},
{"original": " — for that is what the words \"", "translated": " — ", "type": "text"},
{"original": "one flesh\"", "translated": "ఒక శరీరం", "type": "highlight"},
{"original": " would be in modern English.", "translated": " అనే పదాలకు ఆధునిక ఆంగ్లంలో ఇదే అర్థం.", "type": "text"}
],
"sentence_index": 0
},
{
"segments": [
{"original": "And the Christians believe that when He said this He was not expressing a sentiment but stating a faet — just as one is stating a faet when one says that a lock and its key are one mechanism, or that a violin and a bow are one musical instrument.", "translated": "మరియు క్రైస్తవులు ఆయన ఇలా చెప్పినప్పుడు, ఆయన ఒక భావోద్వేగాన్ని వ్యక్తం చేయలేదని, కానీ ఒక వాస్తవాన్ని చెబుతున్నారని నమ్ముతారు — తాళం మరియు దాని కీ ఒకే యంత్రాంగం అని లేదా వయొలిన్ మరియు దాని విల్లు ఒకే సంగీత వాయిద్యం అని చెప్పినప్పుడు ఒక వాస్తవాన్ని చెబుతున్నట్లే.", "type": "text"}
]
},
{
"segments": [
{"original": "The inventor of the human machine was telling us that its two halves, the male and the female, were made to be combined together in pairs, not simply on the sexual level, but totally combined.", "translated": "మానవ యంత్రం యొక్క ఆవిష్కర్త దాని రెండు భాగాలు, పురుషుడు మరియు స్త్రీ, కేవలం లైంగిక స్థాయిలో మాత్రమే కాకుండా, పూర్తిగా జతలుగా కలపడానికి తయారు చేయబడ్డాయి అని మనకు చెబుతున్నారు.", "type": "text"}
]
}
]
}
]
}
Goal: To provide novice translators with necessary cultural and theological context to make informed decisions about their ${TARGET_LANGUAGE} word choices.
Prompt: "You are a cultural and theological annotator. Your goal is to analyze the highlighted English terms and provide detailed context for novice translators working in ${TARGET_LANGUAGE}.
Generate a single JSON object named translated_highlighted_words. This object should contain an array of entries for the highlighted terms (e.g., 'Christian marriage,' 'one flesh').
For each entry, include the following keys:
word (The English term)
paragraph_id
sentence_index
sentence_original
translation_${TARGET_LANGUAGE} (The translated word in the target language)
similarity_match [] (sentences that are similar)
cultural_context (A detailed explanation of the potential cultural or theological challenge the translator faces in the target context)
reference (The source of the concept, e.g., 'Christian Theology', 'General Idiom')." (string)
example:
{
"translated_highlighted_words": [
{
"word": "Christian marriage",
"paragraph_id": "P1",
"sentence_index": 1,
"sentence_original": "I discussed what was wrong with the sexual impulse in man, but said very little about its right working — in other words, about Christian marriage.",
"translation_telugu": "క్రైస్తవ వివాహం",
"similarity_match": "High/Specific Terminology",
"cultural_context": "In many Indian contexts, 'marriage' is primarily viewed through societal, familial, and ritualistic lenses. Highlighting this clarifies that the author is discussing a specific theological/denominational model (indissolubility, fidelity).",
"reference": "Christian Theology"
},
{
"word": "second hånd",
"paragraph_id": "P1",
"sentence_index": 4,
"sentence_original": "The second is that I have never been married myself, and, therefore, can speak only at second hånd.",
"translation_telugu": "రెండవ చేతి ద్వారానే",
"similarity_match": "Idiomatic/Conceptual",
"cultural_context": "The idiomatic phrase 'at second hand' (lack of direct experience) is translated literally. It's highlighted because an unmarried person speaking authoritatively on marriage may be viewed with less credibility in some conservative cultural settings.",
"reference": "General idiom"
},
{
"word": "Christian morals",
"paragraph_id": "P1",
"sentence_index": 5,
"sentence_original": "But in spite of that, I feel I can hardly leave the subject out in an account of Christian morals.",
"translation_telugu": "క్రైస్తవ నీతి",
"similarity_match": "High/Specific Terminology",
"cultural_context": "The inclusion of 'Christian' emphasizes the specific, Biblically-derived ethical framework that may contrast with local moral standards or dharma.",
"reference": "Christian Ethics"
},
{
"word": "single organism",
"paragraph_id": "P2",
"sentence_index": 0,
"sentence_original": "The Christian idea of marriage is based on Christ's words that a man and wife are to be regarded as a single organism...",
"translation_telugu": "ఒకే జీవిగా",
"similarity_match": "Metaphorical",
"cultural_context": "The use of 'organism' (జీవి) to describe a marital relationship is a highly Western/analytic approach, emphasizing functional unity and interdependence. This may be seen as cold or unfamiliar compared to more common Indian metaphors for marriage.",
"reference": "Analytical/Western thought"
},
{
"word": "one flesh",
"paragraph_id": "P2",
"sentence_index": 0,
"sentence_original": "The Christian idea of marriage is based on Christ's words that a man and wife are to be regarded as a single organism — for that is what the words \"one flesh\" would be in modern English.",
"translation_telugu": "ఒక శరీరం",
"similarity_match": "Theological/Metaphorical",
"cultural_context": "A direct biblical phrase. While translated accurately as 'one body' ('ఒక శరీరం'), its meaning in a Western context implies a total, permanent, and unique bond (used to argue against divorce). This theological depth may be lost to a reader unfamiliar with the Biblical context.",
"reference": "Bible/Christian Theology"
}
]
}
Goal: To provide novice translators with a clear, concise definition of the term in its original English context, ensuring they understand the source meaning before attempting translation.
Prompt: "You are a terminology specialist. Your goal is to provide clear glossary definitions for novice translators working in ${TARGET_LANGUAGE} to ensure they fully grasp the source meaning of critical terms.
Generate a single JSON object named original_highlighted_words. This object should contain an array of entries for the same highlighted terms (e.g., 'Christian marriage,' 'one flesh').
For each entry, include the following keys:
word (The English term)
paragraph_id and sentence_index (For precise source linking)
sentence_original
glossary_definition (A brief, clear definition of the term in its original English, theological, or idiomatic context, without using the target language)."
reference (string)
{
"original_highlighted_words": [
{
"word": "Christian marriage",
"paragraph_id": "P1",
"sentence_index": 1,
"sentence_original": "I discussed what was wrong with the sexual impulse in man, but said very little about its right working — in other words, about Christian marriage.",
"glossary_definition": "A theological concept of matrimony, typically defining it as a sacred, lifelong, and indissoluble union between one man and one woman, based on biblical principles."
"reference": "Christian Book"
},
{
"word": "second hånd",
"paragraph_id": "P1",
"sentence_index": 4,
"sentence_original": "The second is that I have never been married myself, and, therefore, can speak only at second hånd.",
"glossary_definition": "An idiom meaning 'indirectly' or 'not from personal experience.' The author is acknowledging that his knowledge of marriage is theoretical, not practical."
"reference": "James Spurgeon"
},
{
"word": "Christian morals",
"paragraph_id": "P1",
"sentence_index": 5,
"sentence_original": "But in spite of that, I feel I can hardly leave the subject out in an account of Christian morals.",
"glossary_definition": "The system of ethics, rules of conduct, and values derived from the Bible and Christian doctrine, emphasizing virtues like charity, humility, and fidelity."
"reference": "Martin Luther"
},
{
"word": "single organism",
"paragraph_id": "P2",
"sentence_index": 0,
"sentence_original": "The Christian idea of marriage is based on Christ's words that a man and wife are to be regarded as a single organism...",
"glossary_definition": "A metaphor used to describe marriage as a functional unit where the two partners, like parts of a living body, are interdependent and cannot be fully separated without injury to the whole."
"reference": "3 Acts of Faith"
},
{
"word": "one flesh",
"paragraph_id": "P2",
"sentence_index": 0,
"sentence_original": "The Christian idea of marriage is based on Christ's words that a man and wife are to be regarded as a single organism — for that is what the words \"one flesh\" would be in modern English.",
"glossary_definition": "A key biblical phrase (from Genesis 2:24, quoted by Christ) defining the union of husband and wife. It implies a total, physical, spiritual, and permanent fusion of their persons."
"reference": "John 3:14"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment