Google Transliteration API:如何获取输入和翻译将输出保存在文本文件中?
大家好;
我需要在 java 应用程序中使用 google transliterrate api。
到目前为止,我所做的是将示例导入到 netbeans 中名为“hellolanguage”的库“gwt-language-1.1.0”中,然后添加了所需的库/罐子。
就像这个演示一样,它运行得很好: hellolanguage 演示 但在我的本地主机上。
我想要做的是音译“inputfile.txt”中的数据,并将输出放入“outputfile.txt”中。
不知道如何实现这个想法?
如果你能帮助我,我会很高兴。
此致;
Greetings All;
I need to use google translitrate api in a java application.
What I have done till now is to import the sample in the library "gwt-language-1.1.0" that called "hellolanguage" in the netbeans, then I added the required libraries/jars.
It worked fine like this demo:
hellolanguage Demo
but on my localhost.
what I want to do is to transliterate data from "inputfile.txt" for example and put the output in an "outputfile.txt".
I don't know how to implement this idea?
I'll be glad if you help me.
Best regards;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要查看 Java IO API,Oracle 对此有一个很好的教程。本教程的这部分将特别有用,并且应该提供一些可剪切和粘贴的代码。
您可以找到一个很好的 Google Transliteration API 示例 此处。您需要在代码部分添加自定义代码,如下所示:
You'll want to take a look at the Java IO API, for which there is a good tutorial at Oracle. This part of the tutorial will be particularly useful, and should provide some cut-and-pasteable code.
You can find a good Google Transliteration API example here. You'll want to add your custom code in the part of the code that looks like this: