谷歌翻译工具包-如何从处理中排除部分文本 [英] google translator toolkit - how to exclude portions of the text from being processed

查看:257
本文介绍了谷歌翻译工具包-如何从处理中排除部分文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道是否有可能将一部分文本排除在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.

这篇关于谷歌翻译工具包-如何从处理中排除部分文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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