問題タブ [moses]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
perl - moses-SMT システムのトークナイザーが 10 文でもスタックする
ベースラインの MT システムを作ろうとしていました。仕組みを確認するためだけに、ソース (S) とターゲット (T) の言語コーパスをわずか 2000 文で作成しました。最初のステップは、機械翻訳 (MT) システム用のデータを準備することです。このステップでは、まずベースライン SMTで説明されているようにトークン化を実行する必要があります。私はこのコードを使用しました:
( S = フランス語 & T = 英語)
2時間後、まだ動いていることを確認しました。予想外だったので気になりました。それからたった10文でやってみました。驚いたことに、それから 30 分が経過しましたが、まだ実行中です。
私は何か悪いことをしましたか?
PS: OS = Ubuntu 14.04.5 LTS ソニー ウルトラブック デュアル ブートなし。
nlp - 最先端の言語翻訳ツールキット
研究のためにスペイン語のツイートを英語に翻訳する必要があります。ツールキットを見つけました。その中で、Mosesはいくつかの研究論文で使用され、他の新しいツールキットはそれらを評価目的のベースラインとして使用しました。なので候補として考えています。また、 Phrsalというスタンフォード大学のツールキットも見つけましたが、これも良さそうです。最後に見つけたのは、有名なnltk
図書館のものです。翻訳パッケージもあります。phrase based statistical machine translation
それらのすべてが、他のテクニックと一緒にテクニックを使用したと述べています。さて、私の質問は、実用的または理論的な観点から、ツイートの翻訳に使用するのに最適なものはどれかということです。それともgoogle translator api
最善の解決策でしょうか?
python - Difference between perl regex to add dots between two numbers in Moses
Context, I'm trying to port a Perl code into Python from https://github.com/moses-smt/mosesdecoder/blob/master/scripts/tokenizer/normalize-punctuation.perl#L87 and there is this regex here in Perl:
If I try it with the Perl script given the input text 123 45
, it returns the same string with a dot. As a sanity check, I've tried on the command line too:
[out]:
And it does so too when I convert the regex to Python,
But when I use the Moses script:
Even when we try to print the string before and after the regex in the Moses code, i.e.
[out]:
We see that before and after the regex, there's no change in the string.
My question in parts are:
- Is the Python
\g<1>.\g<2>
regex equivalent to the Perl's$1.$2
? - Why is it that the Perl regex didn't add the full stop
.
between the two digit groups in Moses? - How to replicate Perl's behavior in Moses in Python regex?
- How to replicate Python's behavior in Perl regex in Moses?