百度翻译vs谷歌翻译

开放给广大用户的在线翻译是百亿市值和千亿市值的一个体现:

原文:Figure 1 presents commented pseudo-code for the nonblocking queue data structure and operations. The algorithm implements the queue as a singly-linked list with Head and Tail pointers. As in Valois’s algorithm, Head always points to a dummy node, which is the first node in the list. Tail points to either the last or second to last node in the list. The algorithm uses compare and swap, with modification counters to avoid the ABA problem. To allow dequeuing processes to free dequeued nodes, the dequeue operation ensures that Tail does not point to the dequeued node nor to any of its predecessors. This means that dequeued nodes may safely be re-used.

百度翻译如下:

谷歌翻译如下:

可能是百度在施行“超英赶美”的计划,无暇顾及惠民工程。 不过话还是要落在重点上,可能百度的600亿不算什么,也是穷人一枚,所以只会顾及“个人利益”。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
实现谷歌在线翻译! //load方法 加载语言版本 当前版本号为1 google.load("language", "1"); //版本为1 function initialize() { //得到要翻译的内容 var text = document.getElementById("text").value; //要翻译成哪国语言 默认为中文 var toLanguage = document.getElementById("language").value; //调用google对象的检测要翻译的对象 arg1:要翻译的文本,arg2:回调函数 google.language.detect(text, function(result) { //如果返回值未出现错误(detect该函数用语检测,估计也有过滤的意思) if (!result.error && result.language) { //调用google语言api的翻译函数 //arg1:要翻译的内容,arg2:通过过滤后对象所属的语言格式,arg3:要转成的类型,arg4:回调函数 google.language.translate(text, result.language, toLanguage, function(result) { //获得要显示翻译结果textarea对象 var translated = document.getElementById("translation"); //如果对象被翻译成功 类似于java的jdbc结果集对象的 .next()方法 if (result.translation) { //设置要显示翻译结果textarea对象的html值 translated.innerHTML = result.translation; } }); } }); } // setOnLoadCallback 该函数 绑定页面加载完毕 调用initialize函数 类似于jQuery的 $(docuemnt).ready(function(){}) google.setOnLoadCallback(initialize); //选择由哪国语言翻译成另外一国语言 function to_language(str){ document.getElementById("language").value = str; if(str == "zh"){ document.getElementById("show").innerText = "英译汉"; }else if(str == "en"){ document.getElementById("show").innerText = "汉译英"; }
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值