Machine translation of Literary Sinitic

« previous post | next post »

Here on Language Log, we've often talked about the great difference between Modern Standard Mandarin (MSM) and the various other Sinitic languages (e.g., Cantonese, Taiwanese, Shanghainese, etc.).  The gap between Classical Chinese and all modern Sinitic languages is even greater than that between MSM and the other modern forms of Sinitic.  It is like the difference between Sanskrit and Hindi, between Latin and Italian, between Classical and modern Greek.

The terminology for Classical Chinese, which I prefer to style "Literary Sinitic", is somewhat vague.  It is referred to variously as gǔwén 古文 ("ancient writing"), wényán(wén) 文言(文) ("literary language [writing]), gǔdài Hànyǔ 古代汉语 ("ancient Sintic"), and so forth.  Furthermore, just as there is a distinction between Vedic and later forms of Sanskrit, so are there stages in the development of Literary Sinitic.

What we call this dead, book language is not so important as the fact that Literary Sinitic (LS) is not the same language as MSM or any of the other modern Sinitic vernaculars.  Consequently, in order to read LS, someone who is literate in MSM must undergo long and arduous training, and — for those who do not know how to read LS — texts written in it must be translated into MSM.  If you go into any decent bookstore in China, Taiwan, or Hong Kong, you will find hundreds of works written in LS that have been translated into MSM.

Similar to Google Translate, Baidu (The Chinese version of Google [see "Soon to be lost in translation"]) has a segment called Bǎidù fānyì 百度翻译 ("Baidu Translator").  I just found out today that Baidu Translator has a function for  translating Mandarin into Classical Chinese and vice versa.

So, in emulation of our Great Leader, I decided to carry out a little Breakfast Experiment™ on Baidu Translator's new function this morning.  The text I have chosen is section 2 from chapter 6, "Dà zōngshī 大宗师" ("The Great Ancestral Teacher") of the Zhuang Zi 莊子 (Master Zhuang), my favorite ancient Chinese text.

Here's the LS original, from the marvelously handy Chinese Text Project.

First the transcription in MSM pronunciation, as provided by Google Translate (I have not attempted to standardize the tones, punctuation, and syllable linkage, so this is meant only as a rough guide for those who are not familiar with Chinese characters):

Sǐshēng, mìng yě, qí yǒu yè dàn zhī cháng, tiān yě. Rén zhī yǒu suǒ bùdé yǔ, jiē wù zhī qíng yě. Bǐ tè yǐ tiān wèi fù, ér shēn yóu ài zhī, érkuàng qí zhuō hū! Rén tè yǐ yǒu jūn wèi yù hū jǐ, ér shēn yóu sǐ zhī, érkuàng qí zhēn hū! Quán hé, yú xiāng yǔ chǔyú lù, xiāng xǔ yǐ shī, xiāngrúyǐmò, bùrú xiāng wàng yú jiānghú. Yǔqí yù yáo ér fēi jié, bùrú liǎng wàng ér huà qí dào. Fū dà kuài zài wǒ yǐ xíng, láo wǒ yǐ shēng, yì wǒ yǐ lǎo, xī wǒ yǐ sǐ. Gù shàn wúshēng zhě, nǎi suǒyǐ shàn wú sǐ yě. Fū cáng zhōu yú hè, cáng shān yú zé, wèi zhī gù yǐ. Rán'ér yèbàn yǒulì zhě fù zhī ér zǒu, mèi zhě bùzhī yě. Cáng dàxiǎo yǒu yí, yóu yǒu suǒ dùn. Ruòfú cáng tiānxià yú tiānxià, ér bùdé suǒ dùn, shì héng wù zhī dà qíng yě. Tè fànrén zhī xíng ér yóu xǐzhī, ruò rén zhī xíng zhě, wàn huà ér wèishǐ yǒu jí yě, qí wéi lè kě shèng jì xié! Gù shèngrén jiāng yóu yú wù zhī suǒ bùdé dùn ér jiē cún. Shàn yāo shàn lǎo, shànshǐshànzhōng, rén yóu xiào zhī, yòu kuàng wànwù zhī suǒ xì, ér yī huà zhī suǒ dài hū!

Now the characters:

死生,命也,其有夜旦之常,天也。人之有所不得與,皆物之情也。彼特以天為父,而身猶愛之,而況其 卓乎!人特以有君為愈乎己,而身猶死之,而況其真乎!泉涸,魚相與處於陸,相呴以溼,相濡以沫,不如相忘於江湖。與其譽堯而非桀,不如兩忘而化其道。夫大 塊載我以形,勞我以生,佚我以老,息我以死。故善吾生者,乃所以善吾死也。夫藏舟於壑,藏山於澤,謂之固矣。然而夜半有力者負之而走,昧者不知也。藏大小 有宜,猶有所遯。若夫藏天下於天下,而不得所遯,是恆物之大情也。特犯人之形而猶喜之,若人之形者,萬化而未始有極也,其為樂可勝計邪!故聖人將遊於物之 所不得遯而皆存。善妖善老,善始善終,人猶效之,又況萬物之所係,而一化之所待乎!

Translation into English by James Legge:

Death and life are ordained, just as we have the constant succession of night and day – in both cases from Heaven. Men have no power to do anything in reference to them – such is the constitution of things. There are those who specially regard Heaven as their father, and they still love It (distant as It is); how much more should they love That which stands out (Superior and Alone)! Some specially regard their ruler as superior to themselves, and will give their bodies to die for him; how much more should they do so for That which is their true (Ruler)! When the springs are dried up, the fishes collect together on the land. Than that they should moisten one another there by the damp about them, and keep one another wet by their slime, it would be better for them to forget one another in the rivers and lakes. And when men praise Yao and condemn Jie, it would be better to forget them both, and seek the renovation of the Dao.

There is the great Mass (of nature) – I find the support of my body on it; my life is spent in toil on it; my old age seeks ease on it; at death I find rest in it – what makes my life a good makes my death also a good. If you hide away a boat in the ravine of a hill, and hide away the hill in a lake, you will say that (the boat) is secure; but at midnight there shall come a strong man and carry it off on his back, while you in the dark know nothing about it. You may hide away anything, whether small or great, in the most suitable place, and yet it shall disappear from it. But if you could hide the world in the world, so that there was nowhere to which it could be removed, this would be the grand reality of the ever-during Thing. When the body of man comes from its special mould, there is even then occasion for joy; but this body undergoes a myriad transformations, and does not immediately reach its perfection; does it not thus afford occasion for joys incalculable? Therefore the sagely man enjoys himself in that from which there is no possibility of separation, and by which all things are preserved. He considers early death or old age, his beginning and his ending, all to be good, and in this other men imitate him; how much more will they do so in regard to That Itself on which all things depend, and from which every transformation arises!

Translation by Victor Mair:

Life and death are destined.  Their constant alternation, like that of day and night, is due to heaven.  What men are unable to interfere with are the attributes of all things.  They particularly regard heaven as their father and love it with their very person.  How much more should they love that which surpasses heaven!  Men particularly regard their lord as superior to themselves and would sacrifice their very person for him.  How much more should they be willing to do so for what is truer than any lord!

When springs dry up, fish huddle together on the land.  They blow moisture on each other and keep each other wet with their slime.  But it would be better if they could forget themselves in the rivers and lakes.  Rather than praising Yao [sage] and condemning Chieh [tyrant], it would be better for people to forget both of them and assimilate their ways.

A boat may be hidden in a gully on a hill that, in turn, is hidden away in a marsh.  We may think this is a secure arrangement, but someone strong might come in the middle of the night and bear (both) the boat (and the hill) away, unbenknownst to the sleeping owner.  The idea of hiding the smaller in the larger is appropriate, yet things may still disappear.  But if we were to hide all under heaven inside of all under heaven, nothing would disappear.  The is the great attribute of the eternality of things.  We are especially happy when we chance to take on human form.  What incalculable joy there is in these myriad transformations, such as human form, which never begin to reach a limit!  Therefore, the sage wanders where things do not disappear and all are preserved.  If people will emulate one who is good at being young and good at growing old, good at beginning and good at ending, how much more should they emulate that to which the myriad things are joined and upon which the unity of transformation depends!

Google Translate (from "Chinese" to English):

Life and death, life also, once it has the regular night, the day also. People are somewhat shall not, things are feeling well. Father Peter in days, and still love the body, and the status of its excellence peace! Special to the king who has almost been more, but the body's still dead, and the status of its true peace! Springs dry up, the fish in the terrestrial phase, phase Ëæ to wet each other, than forget themselves in rivers and lakes. Jie Yao, rather than its reputation, it is better to forget and two of its road. My husband set out to form chunks, to work my students, Yi old me, interest me to death. Gushan my life who are so good Wu Si also. Husband in possession of the boat sink, hidden mountain in Chak, that the solid men. However, those who bear the middle of the night and go strong, ignorant who do not know it. Possession of appropriate size, still somewhat evasive. Chizhov hidden world in the world, and not the escape, the big thing is the constant feeling also. The special shape of the prisoners still hi, if people are to shape, but might come of a very Wan also its win total for the music can be evil! Therefore the sage will swim in the matter shall not escape and were kept. Good good old demon, from start to finish, people are still effective, and the system state of all things, and one of the subject of peace!

Baidu Fanyi (from Zhongwen to English):

[N.B.:  Zhongwen is essentially the written form of Modern Standard Mandarin; see the discussion in "Is Cantonese a language, or a personification of the devil?" and in the comments thereto.]

Life and death, life is also, the night the day dawn. People have not, all physical passion. Pete in the day the father, and who still love, let alone the Zhuo hu! People with you more on oneself, but the body dead, let alone its true almost! Spring up, fish and on land, mutual help in time of poverty, to each other, not forget themselves in the rivers and lakes. And Yu Yao not Jie, not forget the road two. Husband's big block carrying me on shape, I lost my work with students, to the old, making me to death. So good I living, is so good I die. The husband hiding the boat in gully, mountain in Ze, is solid. However, the powerful negative while walking, he also do not know. Reservoir size is appropriate, still has his father. Ruofu reservoir in the world and not the world, Tun, is the great truth of things. Special shape and still like the prisoner, if the person is shaped, all the while there was never a pole, the music can be of evil! Therefore the sage will travel to that which cannot be Tun and all. Good good old demon, begin well and end well, people and performance, and the conditions of all things, and one of the stay!

Bing Translator (from Chinese to English):

Life and death, life, night-Dan, the heavens. Who has not, love. Father Peter in days, and still love it, erkuang it! People in June for himself, death, erkuang it! Springs to dry up and fish facies and in-land, Xu to wet a pair, it is better to forget each other in rivers and lakes. Yu Yao rather Jie, than two of its forgotten road. Chunk contains I-shape, Dr I was born, and lost my old, interest me to death. So good I was so good, I die. Hide boats at gully, cangshan Huizer, is known as the solid. However middle of strong negative, though I do not know. Hide size which I still Dun. Ruofu Tibetan world to light and not DUN, is a constant. Prisoners while Yoshiyuki, man-shaped, and there was nothing else there, whose WINS included the evil! Saints will swim in the matter shall not be deposited Dun. Good and evil to good old, act in person-activity, condition of things, and one of the!

Baidu Fanyi (from Wenyanwen to Zhongwen):


Baidu Fanyi (taking the Zhongwen just above and translating it to English {I couldn't get Baidu Fanyi to go directly from Wenyanwen to English]):

Life and death, command, it is night morning routine, oh. A person who has not, is the animal. He particularly to-day father, but I still love him, and he was excellent too! Only because of you is beyond ourselves, and I was dead, and he was true! The springs dried up, the fish is in the land, by the wet phase out, each other, better known in the arena. With the acclaimed Tang Yao criticism Xia Jie, as two forget the variation rule. The earth in my body, make me with students, I am in my comfort, I desperately information. So in my life, it is because of my death. The boat that hide in the valley, hidden in the deep mountains swamp, yes. However, in the middle of the night with Hercules carrying it away, a person who doesn't know. Reservoir size should be, there will still be lost. As for hidden in the world, and will not be lost, it is generally the case. Special infringement of the body but also happy, if the human body, things don't have very much, he is the music can be calculated! Therefore the sage will swim in all things cannot get there. Better the devil the good old, begin well and end well, people are still effective, and so all the lines, and one of the waiting for what!

Bonus!  I was surprised to discover that Baidu Fanyi supposedly has a Cantonese fucntion, so I decided to try it out too.

Baidu Fanyi (from Wenyanwen to Cantonese):

生死,命令了,它有夜早晨的常规,天啊。人之有不得与,都是动物的情况。他特别以天为父,而我还爱他,何况他卓越吗!人只因为有你为超越自己,而我还是死 了,何况他真的呢!泉水干涸,鱼相处于陆,用湿相喷出,相濡以沫,不如相忘于江湖。与其赞誉唐尧非议夏桀,不如两忘而变化的规律。大地把我的形体,使我以 生,我以我安逸,息我拼命。所以对我生活的人,正是因为对我死了。把船藏在山谷,藏在深山草泽,是的当然了。然而,半夜有大力士背着它逃跑,愚昧的人不知 道的。藏大小有应该,仍然会有丢失。至于藏天下于天下,而不会丢失,这是一般事物的大情形。特侵犯人的形体而还高兴的,如果人的身体的,万物却不曾有极 了,他是音乐可以计算吗!所以圣人将游于万物所不能逃避而都存在。好妖怪好老,善始善终,人们仍然有效的,又何况万物之所系,而一化的等待什么呢!

The result seems to be identical to the Wenyanwen to Mandarin version.  I would appreciate it if Language Log readers who are familiar with Cantonese would see what Baidu Fanyi does with texts between Cantonese and Mandarin, and between Cantonese and English.

Verdict on the Wenyanwen (LS / Classical Chinese) capability of Baidu Fanyi:  so far, it is next to useless.

[Thanks to Wei Shao]


  1. Simon P said,

    June 8, 2014 @ 11:54 pm

    I made a quick test of the Mandarin-Cantonese translation, using the first sentence from a random article at


    Translated as:


    Seems that Baidu only generates content in simplified. In general, the "easy" bits, like replacing "在" with "喺", are done, though some replacements don't work that well. "工作", which is a noun in the original, gets translated to "做嘢", which can only work as a verb. Some bits that work in both Mandarin and Cantonese are still translated, like "長期" as "枕住", which means the resulting text isn't unecessarily "mandariny", which is kinda nice. It even adds sentence particles like 呀 and 架 (㗎)! There are some artifacts, like "單打獨鬥", best left as-is, which gets rendered as "只抽只" (no idea where that comes from), but these look more like the normal problems of machine translation, rather than a bad work on the Canto one.

    All in all, color me impressed!

  2. Simon P said,

    June 9, 2014 @ 12:10 am

    Trying a bit of text from a song by Tonick:

    收工 怪我無去揾你
    翻歸 掛住訓無call你
    出街 我又無死拖實你
    Facebook 最近無click like 你
    Whatsapp 我又無即覆你
    點解 好似點都得罪你
    初初話過永遠不口角 而家講咩都錯

    Rendered as:
    Facebook最近没有click like你

    Also pretty good! Some mistakes are evident, like "死拖實你" (tightly held your hand), being rendered as "死拖肯定你". In this case "實" is used just as in Mandarin, but gets translated for one of it's Canto-specific uses. And "掛住訓" (keep sleeping sleep) becomes "想念睡" (missing sleep), but this is not a common use of the verb "掛住" and can be forgiven. But still, the translator manages to translate "call你" as "给你电话", and correctly identifies 左 and 訓 as the characters properly written as 咗 and 瞓 (Cantonese has no standardized writing, making it more difficult to automate translation). Again, impressive!

  3. Larry Sheldon said,

    June 9, 2014 @ 12:49 am

    I have an off0topic question, that is sortakinda on-topic on the broader scope of "machine translations".

    How will The Secret Service identify and translate sarcasm?

  4. Lugubert said,

    June 9, 2014 @ 3:38 am

    Larry, according to the BBC and others, "The US Secret Service is seeking a Twitter sarcasm detector.

    The agency has put out a work tender looking for a software system to analyse social media data.

    The software should have, among other things, the 'ability to detect sarcasm and false positives.'"

  5. Victor Mair said,

    June 9, 2014 @ 8:16 am

    @Simon P

    Thank you very much for checking out the Mandarin to Cantonese function. It's much better than I expected.

    How about Cantonese to Mandarin? Can you run a little bit of that through the system?

  6. Simon P said,

    June 9, 2014 @ 11:58 am

    @Victor Mair: My second comment above was a translation test from Cantonese to Mandarin. I might try a more challenging test later, though.

  7. Victor Mair said,

    June 9, 2014 @ 12:34 pm

    That's right, Simon P. I appreciate the second test too.

  8. Stephan Stiller said,

    June 9, 2014 @ 12:54 pm

    I don't think that machine translation (MT) of LS is possible.

    LS is inherently ambiguous, and this determines real, hard limits on what is possible. (Translations might want to replicate such ambiguity, but that's another point.) We know that LS – like all non-sign languages – is ultimately based on spoken topolects, but we aren't familiar with the spoken topolects of most LS authors and thus can't take their influence on the written form into account.

    For proper machine translation, we need to directly encode those rules of LS grammar which we understand or train a statistical MT system on massive amounts of LS-MSM training data. In the NLP (natural language processing) community, very few people do the former, and I doubt people can do the latter in a sufficient way.

    We will not have enough data to cover its many genres and dialects: Literary Sinitic is not one written form, but a family of related dialects that have evolved over time. Of some forms, especially the earlier ones, there are only few extant texts. The Chinese of the earliest known form of Chinese writing – the oracle bone inscriptions – (for which we still have a lot of deciphering to do) is different from the language of the bronze inscriptions and the Yìjīng (易經; C Jik6ging1; "I Ching"), and even if we exclude these forms of archaic and Old Chinese from consideration and focus on the later, more uniform literary style, we need to deal with a form of written expression characterized by extensive contextual omission, literary allusion, and syntactic ambiguity, not to speak of genres and remaining dialectal variation. Corpora for modern statistical MT systems have tens of millions of words, and Google Translate, while impressive, is still lacking in so many respects. The long 史記 (Records of the Grand Historian), consisting of just over half a million characters (meaning we have fewer words, and definitely less than half a million lexemic entities) is probably not enough, and it's just one work. What about the monumental collection 四庫全書 with something like 800 million characters (and thus fewer words and lexemically significant entities)? Well, that ought to be enough to see the real hard limits of present-day MT technology ☺

    Still, I think that – at a time when humans are still puzzling over the meaning of many phrases or the grammar of certain forms of LS – MT of LS an impossible undertaking for even the best AI.

  9. Simon P said,

    June 9, 2014 @ 2:10 pm

    Alright, let's feed this baby some Stephen Chow. (Sorry about all the focus on Cantonese. This is kind of a double-topic blog post!)

    Cantonese original, from a site with Stephen Chow movie scripts:


    Again, some of this is really quite impressive. I didn't think it'd get "我咪企喺度等你啰". 咪 is usually a negative, but when the phrase ends in 啰 it's turned positive. However, the 喺度 should probably have been rendered as "在这里", not just "在". There are some other oddities. The program doesn't seem to handle the Cantonese word order too well. It seems to go mostly phrase by phrase. In "打你老窦工", the translator is incapable of recognizing the verb-object compound 打工, and the translation "打你老爸工" is slightly comical. I'm also surprised that 朱古力 is not rendered as the Mandarin 巧克力. The strangest mistake, however, is the last phrase "玩佢唔起架而家". We can see the problem with the Cantonese word order, often putting words like 而家 (now) at the end, being kept in the Mandarin translation. But it's the translation of 玩 as 可是 that really stumps me. I have no idea how that happened. To my knowledge there is no such usage of the word 玩 in Cantonese, and nothing of the sort is indicated in CantoDict. In fact, the word is used the same way in Cantonese as in Mandarin and has no Canto-specific usages at all.

    Sorry, enough of the Cantonese translation thing. I wish I had something to contribute to the discussion of LS, but I've yet to start studying it (I plan to soon, however).

  10. Victor Mair said,

    June 9, 2014 @ 11:59 pm

    From Bob Bauer:

    I quite agree with Simon P's comments about the correspondences between the original Cantonese text and its Mandarin translation.
    Especially odd is the translator not converting the Cantonese loanword for 'chocolate' into the corresponding Mandarin loanword.

  11. josh said,

    June 10, 2014 @ 8:06 am

    天啊. I forget myself in rivers and lakes.

  12. Rubrick said,

    June 16, 2014 @ 4:28 pm

    "Great Leader"?? But I thought you were an autonomous collective!

    (Just kidding. We all know that Roger Shuy is secretly pulling all the strings.)

  13. Rubrick said,

    June 16, 2014 @ 4:28 pm

    I don't think I will ever mature to the point where things like "My husband set out to form chunks" no longer sends me into paroxysms of laughter.

  14. Victor Mair said,

    June 17, 2014 @ 5:26 pm

    With his sharp eye, Julian Wheatley pointed out that my translation omits this part of the Chinese text of the Zhuang Zi: 夫大 塊載我以形,勞我以生,佚我以老,息我以死。故善吾生者,乃所以善吾死也。

    That would come between these two sentences of the translation:

    "Rather than praising Yao [sage] and condemning Chieh [tyrant], it would be better for people to forget both of them and assimilate their ways."


    "A boat may be hidden in a gully on a hill that, in turn, is hidden away in a marsh."

    Here's how I replied to Julian:


    You are such a careful reader, Julian! I just checked my translation on Google Books (only a small portion of the book is available there, but fortunately that passage is included).

    When I looked at the passage on p. 53, it was clear that I had not translated the line that you pointed out:

    夫大 塊載我以形,勞我以生,佚我以老,息我以死。故善吾生者,乃所以善吾死也。

    I think that this may be one of the lines in the book that I had reason to believe were interpolations and that I intentionally omitted.

    I am in Macao for a conference on Chinese Buddhist culture and thought. 95% of the participants are from China, Taiwan, Hong Kong, and Macao. I am the only non-East Asian participant, since — besides me — the only non-Chinese are a Japanese scholar and a Korean scholar.

    Anyway, I'm on the road now and don't have access to my translation of the Zhuang Zi right now, but I suspect that I may have omitted that line on purpose. My recollection is that I probably would have included it in a list of omitted passages at the back of the book.

    Ah, but I do have a way to check after all. I published some reading notes on the Zhuang Zi in Sino-Platonic Papers, 48. See
    On p. 11 (p. 47 of the pdf), note 7. I discuss this very passage.


  15. nqa2 said,

    June 23, 2014 @ 5:57 am

    google translate can tran to any and from language

RSS feed for comments on this post