machine-translation

Open Source Machine Translation Engines?

做~自己de王妃 提交于 2019-12-03 04:30:43
问题 We're looking for an open source Machine Translation Engine that could be incorporated into our localization workflow. We're looking at the options below: Moses (C++) Joshua (Java) Phrasal (Java) Among these, Moses has the widest community support and has been tried out by many localization companies and researchers. We are actually leaning towards a Java-based engine since our applications are all in Java. Have any of you used either Joshua or Phrasal as part of your workflow. Could you

Phrase extraction algorithm for statistical machine translation

筅森魡賤 提交于 2019-12-03 00:27:42
I have written the following code with the phrase extraction algorithm for SMT. GitHub # -*- coding: utf-8 -*- def phrase_extraction(srctext, trgtext, alignment): """ Phrase extraction algorithm. """ def extract(f_start, f_end, e_start, e_end): phrases = set() # return { } if f end == 0 if f_end == 0: return # for all (e,f) ∈ A do for e,f in alignment: # return { } if e < e start or e > e end if e < e_start or e > e_end: return fs = f_start # repeat- while True: fe = f_end # repeat- while True: # add phrase pair ( e start .. e end , f s .. f e ) to set E trg_phrase = " ".join(trgtext[i] for i

Open Source Machine Translation Engines?

旧巷老猫 提交于 2019-12-02 17:42:28
We're looking for an open source Machine Translation Engine that could be incorporated into our localization workflow. We're looking at the options below: Moses (C++) Joshua (Java) Phrasal (Java) Among these, Moses has the widest community support and has been tried out by many localization companies and researchers. We are actually leaning towards a Java-based engine since our applications are all in Java. Have any of you used either Joshua or Phrasal as part of your workflow. Could you please share your experiences with them? Or, is Moses way too far ahead of these in terms of the features

Getting alignment/attention during translation in OpenNMT-py

谁都会走 提交于 2019-12-02 10:04:04
Does anyone know how to get the alignments weights when translating in Opennmt-py? Usually the only output are the resulting sentences and I have tried to find a debugging flag or similar for the attention weights. So far, I have been unsuccessful. You can get the attention matrices. Note that it is not the same as alignment which is a term from statistical (not neural) machine translation. There is a thread on github discussing it. Here is a snippet from the discussion. When you get the translations from the mode, the attentions are in the attn field. import onmt import onmt.io import onmt

BLEU score implementation for sentence similarity detection

家住魔仙堡 提交于 2019-11-30 07:49:46
I need to calculate BLEU score for identifying whether two sentences are similar or not.I have read some articles which are mostly about BLEU score for Measuring Machine translation accuracy.But i'm in need of a BLEU score to find out similarity between sentences in a same language[English].(i.e)(Both the sentences are in English).Thanks in anticipation. Well, if you just want to calculate the BLEU score, it's straightforward. Treat one sentence as the reference translation and the other as the candidate translation. dmcer For sentence level comparisons, use smoothed BLEU The standard BLEU

Translating using Google Translate API

让人想犯罪 __ 提交于 2019-11-29 17:05:32
I want to use the following code as the basis for a program that translates user input to English. I am getting the error "cannot find symbol - GoogleApi." Can someone please help me figure out what to do? import com.google.api.translate.Language; import com.google.api.translate.Translate; public class Main { public static void main(String[] args) throws Exception { // Set the HTTP referrer to your website address. GoogleAPI.setHttpReferrer(/* Enter the URL of your site here */); // Set the Google Translate API key // See: http://code.google.com/apis/language/translate/v2/getting_started.html

BLEU score implementation for sentence similarity detection

不打扰是莪最后的温柔 提交于 2019-11-29 10:07:24
问题 I need to calculate BLEU score for identifying whether two sentences are similar or not.I have read some articles which are mostly about BLEU score for Measuring Machine translation accuracy.But i'm in need of a BLEU score to find out similarity between sentences in a same language[English].(i.e)(Both the sentences are in English).Thanks in anticipation. 回答1: Well, if you just want to calculate the BLEU score, it's straightforward. Treat one sentence as the reference translation and the other

Is there a tutorial about giza++? [closed]

南笙酒味 提交于 2019-11-28 17:37:12
The Urls in its 'readme' file is not valid ( http://www.fjoch.com/mkcls.html and http://www.fjoch.com/GIZA++.html ). Is there a good tutorial about giza++? Or is there some alternatives that have complete documentation? dmh The following is excerpted from a tutorial I'm putting together for a class. (NB: This assumes you have successfully installed GIZA++-v2 on a *nix system.) Start with two data files containing parallel sentences that have been tokenized, one sentence per line. For example, a pair of parallel English-French files might read as follows. Sample 1 - train.en I gave him the book

Translating using Google Translate API

梦想的初衷 提交于 2019-11-28 11:35:24
问题 I want to use the following code as the basis for a program that translates user input to English. I am getting the error "cannot find symbol - GoogleApi." Can someone please help me figure out what to do? import com.google.api.translate.Language; import com.google.api.translate.Translate; public class Main { public static void main(String[] args) throws Exception { // Set the HTTP referrer to your website address. GoogleAPI.setHttpReferrer(/* Enter the URL of your site here */); // Set the

Google Translate iframe workaround

戏子无情 提交于 2019-11-28 07:01:00
问题 I'm using Google Translate tools to translate a web page and I also have an iframe on this page, that is not obviously translated with the page. Is there a workaround, that any of you know, so I can have the iframe translated as well? 回答1: This is a genuine limitation or policy of Google Translate. You can't rewrite iframe content. But one thing you can do is change iframe url to translated page like: <iframe height="1200" width="600" src="http://translate.google.com/translate?hl=bg&ie=UTF-8