谷歌翻译工具包-如何从处理中排除部分文本

问题描述:

有人知道是否有可能将一部分文本排除在Google翻译工具的处理范围之外吗?

Does anybody know whether there is a possiblity to exclude portions of a text from being processed by the google translator toolkit?

此工具的一大优点是可以建议已经在其他上下文中翻译过的句子的翻译.但是,如果在文本中添加了任何其他脚注和/或备注,则不会将其识别为匹配项.我正在寻找一种将此类文本括在括号"中的可能性,而该文本将被忽略.

A great advantage of this tool is that it suggests the translations of sentences which have already been translated in another context. However, if any additional footnote and/or remark has been added to the text, it won't be recognized as a match. I am looking for a possibility to enclose such text in "brackets" within which it will be ignored.

例如,以下两个字符串应被视为相同:

For example, the following two strings should be recognized as identical:

"This is one continuous sentence."
"This is {this text will be ignored}one continuous sentence."

并翻译为德语:

"Dies ist ein zusammenhängender Satz."
"Dies is {this text will be ignored}ein zusammenhängender Satz."

如有必要,我可以给此类插入物编号,并将其内容放入其他段落中,例如:

If neccessary I could number such insertions and place their content into additional paragraphs like:

"This is one continuous sentence."
"This is {1}one continuous sentence."
"{1 this text will be ignored}

非常感谢, 马塞尔(Marcel)

thanks a lot in advance, Marcel

Google引用引用常见问题解答 ...

我如何告诉Cloud Translation API不要翻译某些内容?

您可以使用以下HTML标签:

How do I tell Cloud Translation API to NOT translate something?

You can use the following HTML tags:

<span translate="no"> </span>
<span class="notranslate"> </span>

此功能要求源文本以HTML提交.

This functionality requires the source text to be submitted in HTML.

如果对您不起作用",可能的原因是您请求的是TEXT翻译而不是HTML翻译.如果只希望进行TEXT翻译,则可以将计划文本包装在HTML标记中(使用上述<span>标记),然后在翻译后将其解包.

If it's "not working for you" a likely reason is that you requested TEXT translation not HTML translation. If you only want TEXT translation then wrapper your plan text in HTML tags (with <span> tags as above) and then unwrap after translation.