tisfeng / Easydict

一个简洁优雅的词典翻译 macOS App。开箱即用,支持离线 OCR 识别,支持有道词典,🍎 苹果系统词典,🍎 苹果系统翻译,OpenAI,Gemini,DeepL,Google,Bing,腾讯,百度,阿里,小牛,彩云和火山翻译。A concise and elegant Dictionary and Translator macOS App for looking up words and translating text.
GNU General Public License v3.0
6.38k stars 324 forks source link

dev: prompt 表达问题 #552

Closed cyugao closed 1 month ago

cyugao commented 1 month ago

看了下prompt,感觉很多Chinglish的表达,建议喂给chatgpt重新改写一下。比如 https://github.com/tisfeng/Easydict/blob/d6a2817a9091c6e06fc4b2ca2dc719b16b5b61e7/Easydict/Swift/Service/OpenAI/Prompt.swift#L319

"3. According to the results of literal translation, find out the existing problems, including [but] not limited to: not in line with (targetLanguage) expression habits, [the] sentence is not smooth, obscure, difficult to understand, and then re-free translation, on the basis of ensuring the original meaning of the content, make it easier to understand, more in line with the (targetLanguage) expression habits, while keeping the original format unchanged. If this sentence contains proverbs, metaphors, historical allusions, or comes from famous works, please break the line after the translation and attach its detailed introduction. Desired display format: \"(freeTranslation):\n{free_translation} \", \n\n"

expression habits? re-free => rephrase? "attach its detailed introduction"?

用Gemini重写了一下

Review the literal translation, identifying any issues such as unnatural phrasing, awkwardness, ambiguity, or difficulty understanding it in (targetLanguage). Then, retranslate it into a smoother, clearer version that aligns better with (targetLanguage) norms, while retaining the original meaning and format. If the sentence contains idioms, metaphors, historical references, or quotes from famous works, include a line break after the translation followed by a detailed explanation. The desired output format is: "(freeTranslation):\n{free_translation}",\n\n"

github-actions[bot] commented 1 month ago

Hello cyugao, Thank you for your first issue contribution 🎉

tisfeng commented 1 month ago

ok,稍后我优化一下。

tisfeng commented 1 month ago

Prompt 已优化。