如何调用有道翻译api进行汉译英
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何调用有道翻译api进行汉译英相关的知识,希望对你有一定的参考价值。
使用的是有道提供的
http://fanyi.youdao.com/openapi.do?keyfrom=<keyfrom>&key=<key>&type=data&doctype=json&version=1.1&q=$value
json数据格式,但是在BAE里对链接进行抓取的时候无法得到正确结果。
$content = $fetch->get($qurl);
$qurl就是上面的地址,但是content就不对了。
请问是什么原因?
errorCode为0,不是超出权限的问题,而且英文都可以。中文输入进去之后,比如打个‘我’,query就为"?\u0088\u009",这个应该是iso-8859的编码吧?
来自:求助得到的回答本回答被提问者采纳 参考技术A 用百度翻译的api吧,比有道支持的语种多,还可以免费扩容,百度翻译首页有入口请英语高手帮忙 汉译英句子
片断一:
文化已经成为经济发展的重要战略资源,成为综合国力的重要标志,成为发展先进生产力的重要组成部分。吴文化作为中华文化的组成部分,其丰富多彩的物化形态、门类齐全的艺术形态、独特的人文形态显示它的丰厚性。在现代化进程中,吴文化起到了不可替代的作用。
片断二:
科技是第一生产力。党的十六届五中全会提出了建设社会主义新农村的重大历史任务。建设社会主义新农村,总的要求是“生产发展、生活宽裕、乡风文明、村容整洁、管理民主”。进行经济建设、政治建设、文化建设、社会建设和党的建设协调推进的新农村,这一切的基础,就是加快发展农村经济,以农业新科技促进农业发展,推进社会主义新农村建设。
谢谢了!我知道这很麻烦。
文化已经成为经济发展的重要战略资源,成为综合国力的重要标志,成为发展先进生产力的重要组成部分。吴文化作为中华文化的组成部分,其丰富多彩的物化形态、门类齐全的艺术形态、独特的人文形态显示它的丰厚性。在现代化进程中,吴文化起到了不可替代的作用。
片断二:
科技是第一生产力。党的十六届五中全会提出了建设社会主义新农村的重大历史任务。建设社会主义新农村,总的要求是“生产发展、生活宽裕、乡风文明、村容整洁、管理民主”。进行经济建设、政治建设、文化建设、社会建设和党的建设协调推进的新农村,这一切的基础,就是加快发展农村经济,以农业新科技促进农业发展,推进社会主义新农村建设。
Fragment a:
The culture has already become the important and strategic resources of the economic development, becoming the important marking of the comprehensive national strength, the importance that becomes developping advanced productivity constitutes part.Wu's culture is the constitute of the China culture part, it abundant colorful thing turn well-found art appearance,special humanities appearance of appearance,door to show its big.In the modern progress, Wu's culture's have can't act for of function.
Fragment two:
Science and technology is one productivity.Party of 16 five win whole will put forward constucting socialism new the important history mission of the village.Constuct new village of socialism, the total request BE"produce a development, life lenient, the country breeze civilization,village permit clean and neat, management democracy".Carry on the economy construction,political construction,culture construction,the construction of the social construction and party moderate push forward of new village, the foundation of the all these, be develop village quickly economy, with agriculture new science and technology promote the agriculture develop, pushing forward socialism new village construction. 参考技术A Culture already becomes important economic growth strategy resource , becomes an important indicator of our overall national strength , becomes the developing the advanced productive forces important component. Wu culture is China culture ingredient , whose materialization form of colour and variety , industrial system which is complete in range art form , unique humanity form demonstrate its thick.
Science and technology constitute a primary productive force. The 5th Plenary Session of the 16th CPC Central Committee has brought forward the historic task building new rural area of socialism significance. Building new rural area of socialism , the general request is "to produce the plenty developing , living , countryside wind civilization , village hold the democracy clean and tidy , managing". Construction and the Party building carrying out economic development , political development , cultural advancement , society harmonize new rural area , all these basis moving forward , are rural economy accelerate the development, new science and technology boosts an agriculture developing , pushes forward new rural construction of socialism with the agriculture.本回答被提问者采纳 参考技术B 1
Culture has become an important strategic resource for economic development, has become an important indicator of overall national strength. become an important component of the development of advanced productive forces. Miss culture as an integral part of Chinese culture, the reification of colorful patterns of a wide range of art forms. It shows the enormous human form of a unique nature. In the process of modernization, cultural Wu has played an irreplaceable role.
2
Technology is the primary productive force. The Fifth Plenary Session of the 16th CPC Central Committee put forward a major historic task of building a new socialist countryside. Building a new socialist countryside, the general requirement is \"the development of production, affluent and civilized style rural village : clean, democratic management.\" Economic, political, cultural and social development and promoting the building of a new rural party, the foundation of it all. is to accelerate the development of the rural economy, promote the development of agriculture to new technologies in agriculture, promote new socialist countryside.
以上是关于如何调用有道翻译api进行汉译英的主要内容,如果未能解决你的问题,请参考以下文章
Python 爬虫篇 - 调用有道翻译api接口翻译外文网站的整篇西班牙文实战演示。爬取西班牙语文章调用有道翻译接口进行整篇翻译