Wednesday, November 22, 2023

Solutions to the failure to replace English quotation mark with Chinese quotation mark in ChatGPT

In the previous post, I shared the following code:

Replace " with 「 at the beginning of a quoted text.
Replace " with 」 at the end of a quoted text.

However, ChatGPT doesn't always do what it is supposed to do. 
For instance, the following translation totally neglected the commend and continued to use the English quotation mark:

在辦公室外的走廊裡,我試圖以盡可能冷靜的方式開始對話。“我覺得我們應該談談今天早些時候發生的事情。”我盡力應用他們教我的溝通技巧,著重於我的個人感受,避免指責的遊戲。
“是誰給你權利來我的辦公室責罵我......”大砰小姐立即發動了一場攻擊。
“我不是來和你吵架的。我只是想告訴你,我對發生的事情感到相當不安。”我試圖保持專業態度。畢竟,我們都在工作。
“你不高興?那我呢……”

After numerous trial and errors, I found a solution for it. Essentially, cutting down on the amount of text to be translated and following is the outcome.

在辦公室外的走廊裡,我盡可能冷靜地開始了對話。「我覺得我們應該談談今天早些時候發生的事情。」我盡力應用他們教我的溝通技巧,著重於我的個人感受,避免指責的遊戲。
「是誰給你權利來我的辦公室責罵我......」大砰小姐立即發動了一場攻擊。
「我不是來和你吵架的。我只是想告訴你,我對發生的事情感到相當不安。」我試圖保持專業態度。畢竟,我們都在工作。
「你不高興?那我呢……」

If cutting down on the amount of text doesn't work, try to convert the quotation mark using the translated text.

These are two solutions I found so far.

Sunday, November 5, 2023

Code to replace English quotation mark with that of Chinese using ChatGPT

I've been translating my books with the assistance of ChatGPT, which does a good job in converting the English punctuation into Chinese punctuation. However, somehow it seldom replace English double quotation marks with Chinese double quotation marks:

So I asked ChatGPT how it could be done and following is its response:

Replace " with 「 at the beginning of a quoted text.

Replace " with 」 at the end of a quoted text.

Saturday, November 4, 2023

Centered Chinese punctuation

 I have been trying to translate my books into traditional Chinese. Being a novice in typing in Chinese, I use the Pinging method since the bopomofo method requires the user to be familiar with the bopomofo keyboard. 

Why do I mention this?

These two days, I realized that the Chinese punctuation I typed out and translated via ChatGPT were positioned on the lower left side as opposed to centered. I went back to read some Chinese books and found out it seemed to be the conventional practice for the punctuation to be centered.  

Lower left side example: 然後,佛祖退出了這場沒有白兔的茶會。

Centered example: 然後,佛祖退出了這場沒有白兔的茶會。

After all the googling and ChatGPTing, nobody ever mentioned this issue. Also, the replace feature in Words does nothing when I asked it to replace " 。" with "。".

Just now, I decided to check in Word the specs of the font and realized that all that I had to do is to Change the font to PMingLiU. I selected all and changed the font to PMingLiU and the problem was solved.