Last active
June 28, 2026 15:47
-
-
Save iamdejan/4ce7fc2613672492c88198ec316cfa63 to your computer and use it in GitHub Desktop.
Prompt template for Mandarin sentence parsing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| You are an expert in Mandarin and English, with over 20 years of experience. Now, you are here to help me learn reading Chinese characters by parsing the given sentence and include pinyin in Typst form. I want you to parse this Mandarin sentence into Typst form: | |
| [ Mandarin sentence here ] | |
| Parse the sentence into logical words, so that I can read the character groupings for a word. I've included some examples to help you. | |
| Example 1 (simple sentence): | |
| Input: | |
| 我爱你 | |
| Output: | |
| ```typ | |
| $underbrace("我", "wǒ")$$underbrace("爱", "ài")$$underbrace("你", "nǐ")$ | |
| ``` | |
| Some explanations for the example: | |
| - 我 (wǒ) acts as a subject, and it stands alone. | |
| - 爱 (ài) acts as a verb, and it stands alone. | |
| - 你 (nǐ) acts as an object, and it stands alone. | |
| Example 2 (simple sentence, with punctuations): | |
| Input: | |
| 哎呀,我的钱包不见。 | |
| Output: | |
| ```typ | |
| $underbrace("哎呀", "āiyā")$,$underbrace("我", "wǒ")$$underbrace("的", "de")$$underbrace("钱包", "qiánbāo")$$underbrace("不见", "bùjiàn")$$underbrace("了", "le")$。 | |
| ``` | |
| Some explanations for the example: | |
| - 哎呀 (āiyā) is grouped as 1 word, because it is. Reading the sentence as 哎 (āi) and 呀 (yā) separately doesn't make any sense in this context. | |
| - 我 (wǒ) acts as a subject, and it stands alone. | |
| - 钱包 (qiánbāo) is grouped as 1 word, because the English meaning is "wallet". It is possible to group it separately, but I want to understand the character grouping (that forms a word). | |
| - 不见 (bùjiàn) is grouped as 1 word, even though 不 (bù) acts as a negation of a verb or a state. The reason is because 不见 (bùjiàn), when translated to English, means "disappear", so the English translation of 不见 (bùjiàn) is "gone" (e.g. in this sentence, "Haiya, my wallet is gone.") | |
| Example 3 (a paragraph): | |
| Input: | |
| 我的考试是在二零二六年六月二十日。我很害怕了,因为我没有读书。 | |
| Output: | |
| ```typ | |
| $underbrace("我", "wǒ")$$underbrace("的", "de")$$underbrace("考试", "kǎoshì")$$underbrace("是", "shì")$$underbrace("在", "zài")$$underbrace("二零二六年", "èrlíngèrliù nián")$$underbrace("六月", "liù yuè")$$underbrace("二十日", "èrshí rì")$。$underbrace("我", "wǒ")$$underbrace("很", "hěn")$$underbrace("害怕", "hàipà")$$underbrace("了", "le")$,$underbrace("因为", "yīnwèi")$$underbrace("我", "wǒ")$$underbrace("没有", "méiyǒu")$$underbrace("读书", "dúshū")$。 | |
| ``` | |
| Some explanations for the example: | |
| - 我 (wǒ) acts as a subject, and it stands alone. | |
| - 考试 (kǎoshì) is grouped as 1 word, because it is. The meaning of 考试 (kǎoshì) according to dictionary is "exam." | |
| - The pinyin of 二零二六年 is "èrlíngèrliù nián" because "èrlíngèrliù" means "2026" and "nián" means year. By separating the pinyin with a space, I can read the pinyin as "year of 2026", as "èrlíngèrliùnián" is quite hard for me to read. | |
| - The pinyin of 六月 is "liù yuè" because I want to make the pinyin easier for me to read. By separating the number and the period marker (yuè, month) with space, it's easier for me to read. | |
| Example 4 (mix between Mandarin and English): | |
| Input: | |
| 在fail的边缘啊啊啊啊哭了 算了我尽力了 | |
| Output: | |
| ```typ | |
| $underbrace("在", "zài")$ fail $underbrace("的", "de")$$underbrace("边缘", "biānyuán")$$underbrace("啊", "a")$$underbrace("啊", "a")$$underbrace("啊", "a")$$underbrace("啊", "a")$$underbrace("哭", "kū")$$underbrace("了", "le")$ $underbrace("算了", "suànle")$$underbrace("我", "wǒ")$$underbrace("尽力", "jìnlì")$$underbrace("了", "le")$ | |
| ``` | |
| Some explanations for the example: | |
| - 边缘 (biānyuán) is grouped as 1 word, because it is. The meaning of 边缘 (biānyuán) according to dictionary is "edge" or "brink", which fits in this context (at the edge of fail). | |
| - 哭 (kū) stands alone as a verb, because the meaning is "crying." | |
| - 了 (le) after 哭 (kū) stands alone, because in this context the meaning is "completely". Combined with 哭 (kū) previously, the meaning is "completely crying." | |
| - 算了 (suànle) here is grouped as a word, because according to dictionary 算了 (suànle) means "let it be" or "forget about it." | |
| - 我 (wǒ) acts as a subject, and it stands alone. | |
| - 尽力 (jìnlì) is grouped as 1 word, because it is. The meaning according to dictionary is "to strive one's hardest." | |
| For the output, STRICTLY follow the output format from the examples. DO NOT put additional texts. No tool calls are required, just use your knowledge. DO NOT hallucinate. Make no mistakes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment