在Bing翻译期间保留原始内容的换行/回车 [英] Preserve line feed/Carriage return from original content during Bing translation

查看:116
本文介绍了在Bing翻译期间保留原始内容的换行/回车的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的支持,

在测试过程中,我发现换行后无法保留换行符(\ n)和回车符(\ r)。 \\ n是有效的,这对我来说也很有意义。虽然它可能听起来很愚蠢,但换行(这个案例必须是CRLF)是我的分隔符连接数百美元b $ b的条目,并分割文本以提高性能,我的余额被附加字符迅速消耗...我发现支付这些不值得的人物,但也不能牺牲性能。

During testing, I found that line feed (\n) and carriage return(\r) can't be preserved after translation. \r\n works, which makes sense to me, too. Although it might sound stupid but newline (this case has to bee CRLF) is my delimiter to concatenate hundreds of entries, and split text to boost performance, and my balance is consumed quickly by the additional character... I found paying for such characters not worth it, but can't sacrifice performance either.

好奇是否有更好的解决方案?这只是我个人的询问,根本没有Translator API的问题。 :)非常感谢。

Just curious if there's better solution for this? This is just my personal inquiry, and there's no problem about Translator API at all. :) Thanks very much ahead.

最好的问候,

Lynn

Best Regards,
Lynn

推荐答案

嗨Lynn,

这是对的,CR或LF单独被视为非句子破坏空格。与contentType = text / plain模式一起使用的CRLF计为新句子。你确实希望保持CRLF所包含的每个短语或句子的语义,以便保持单元的完整翻译

that's right, CR or LF alone are treated as non-sentence breaking white space. A CRLF used with contentType=text/plain mode counts as a new sentence. You do want to maintain the semantics of each phrase or sentence enclosed by CRLF in order to keep translating the unit intact.

CRLF是一个非常紧凑的句子中断。如果每一行已经以句号或其他句末标点符号结尾,您也可以使用"。 " (句号+空格)作为句子符号。这样可以节省一个字符。

CRLF is a very compact sentence break. If each line already ends with a period or other sentence end punctuation, you could also use ". " (period+space) as a sentence break mark. That would save one character.

Chris Wendt

Microsoft Translator

Chris Wendt
Microsoft Translator


这篇关于在Bing翻译期间保留原始内容的换行/回车的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆