0
How to run MOSES?
Step 1: Install CYGWIN <ul><li>Follow the instructions listed in the following URL:  http://x.cygwin.com/docs/ug/setup.htm...
Step 2: Preparing Your Environment <ul><li>Go to Drive C: </li></ul><ul><li>Go to cygwin folder </li></ul><ul><li>Go to ho...
Step 3: Check “Demo” Folder Contents <ul><li>Data Folder  (empty folder) </li></ul><ul><li>Tools Folder  (contains Giza++,...
Step 4: Place your input files in Demo/Work/Corpus <ul><li>Copy the  Arabic File  (for example: un.ar) and the  Translated...
Step 5: Lower Case Your Input Files <ul><li>Go to Desktop and double Cygwin </li></ul><ul><li>Write the following in the p...
Step 6: Build Your language model (1/2) <ul><ul><li>if you want to translate from  English  to  Arabic , you have to make ...
Step 6: Build Your language model (2/2) <ul><ul><li>Go to C:cygwinhomeagalaldemoworkcorpus </li></ul></ul><ul><ul><li>Copy...
Step 7: Train Phrase Model <ul><ul><li>Go to “Train-model” located at C:cygwinhomeAgalaldemotoolsbinmoses-scriptsscripts-2...
Step 8: Translate ! <ul><ul><li>Put the English file (for example: un.en) that you want to translate at: C:cygwinhomeagala...
Thank You!
Upcoming SlideShare
Loading in...5
×

How to run_moses 2

661

Published on

cygwin steps

Published in: Education, Technology
5 Comments
0 Likes
Statistics
Notes
  • أي واحد عايز مساعدة في موضوع الترجمة عبر موديلز يتواصل معي ، اسمي عالفيسبوك Hamdi Rajeh
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • @Ahmed try to search about this topic (build moses on ubuntu) here on this website (slideshare.net) &gt;&gt; ابحث عن اسم المرجع المكتوب في خانة البحث فوق.. وهتلاقيه مفصل جداً جداً .. فقط حاول انك ما تنفذهوش على فيرشوال بل نفذه على كنظام حقيقي
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • السلام عليكم يا محمود
    Where can I find the demo folder to copy it before I paste it in the folder inside the home folder?
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • @Hamdi Ahmed85 السلام عليكم يا حمدى

    أرجو منك ان تساعدنى فى كيفية بناء مودديل للترجمة من انجليزى للعربى
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • اسال الله ان لا يعطيك جزاءً الا الفردوس الاعلى من الجنة ... يعلم الله كيف حالي بسبب هذا الموضوع وانت ارسلك الله لي للمساعدة ..جزيت خيرا
    لو كان بامكانك رفع ملف الادخال الانجليزي والعربي لكنت سهلت اكثر واكثر
    .... اخوك حمدي
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Views
Total Views
661
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
20
Comments
5
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "How to run_moses 2"

  1. 1. How to run MOSES?
  2. 2. Step 1: Install CYGWIN <ul><li>Follow the instructions listed in the following URL: http://x.cygwin.com/docs/ug/setup.html </li></ul><ul><li>You have to install the whole packages </li></ul><ul><li>After finishing CYGWIN installation, check the icon of CYGWIN on your desktop </li></ul>
  3. 3. Step 2: Preparing Your Environment <ul><li>Go to Drive C: </li></ul><ul><li>Go to cygwin folder </li></ul><ul><li>Go to home folder </li></ul><ul><li>Access the only folder in home folder (for example: agalal ) </li></ul><ul><li>Paste the “ Demo ” Folder in your flash stick into the last folder </li></ul>
  4. 4. Step 3: Check “Demo” Folder Contents <ul><li>Data Folder (empty folder) </li></ul><ul><li>Tools Folder (contains Giza++, SRILM, IRSTL, and MOSES) </li></ul><ul><li>Work Folder (contains corpus folder and lm where they must be empty before proceeding the translation process) </li></ul>
  5. 5. Step 4: Place your input files in Demo/Work/Corpus <ul><li>Copy the Arabic File (for example: un.ar) and the Translated File (for example: un.ar) to C:cygwinhomeagalaldemoworkcorpus </li></ul>Change it according to the folder name in your computer
  6. 6. Step 5: Lower Case Your Input Files <ul><li>Go to Desktop and double Cygwin </li></ul><ul><li>Write the following in the popup window: </li></ul><ul><ul><li>cd /home/agalal/demo </li></ul></ul><ul><ul><li>press enter </li></ul></ul><ul><ul><li>Then write the following command in one line </li></ul></ul><ul><ul><li>Press enter </li></ul></ul><ul><ul><li>Then write the following command in one line </li></ul></ul><ul><ul><li>Press enter </li></ul></ul><ul><ul><li>Tools/scripts/tokenizer/lowercase.perl <work/corpus/un.ar> work/corpus/un.lowercased.ar </li></ul></ul><ul><ul><li>Tools/scripts/tokenizer/lowercase.perl <work/corpus/un.en> work/corpus/un.lowercased.en </li></ul></ul>Input Arabic file Input English file Output Arabic file Output English file
  7. 7. Step 6: Build Your language model (1/2) <ul><ul><li>if you want to translate from English to Arabic , you have to make the following: </li></ul></ul><ul><ul><li>1- Build Arabic Language Model </li></ul></ul><ul><ul><li>2- Consider English as the foreign language </li></ul></ul><ul><ul><li>3- Consider Arabic as the source language </li></ul></ul><ul><ul><li>if you want to translate from Arabic to English , you have to make the following: </li></ul></ul><ul><ul><li>1- Build English Language Model </li></ul></ul><ul><ul><li>2- Consider Arabic as the foreign language </li></ul></ul><ul><ul><li>3- Consider English as the source language </li></ul></ul>
  8. 8. Step 6: Build Your language model (2/2) <ul><ul><li>Go to C:cygwinhomeagalaldemoworkcorpus </li></ul></ul><ul><ul><li>Copy the un.lowercased.ar (the file that we will use to build the language model in case we translate from English to Arabic) </li></ul></ul><ul><ul><li>Paste the file in C:cygwinhomeagalaldemoworklm </li></ul></ul><ul><ul><li>Write the following command in cygwin window in one line: </li></ul></ul>tools/srilm/bin/i686/ngram-count -order 3 -interpolate -kndiscount -unk -text work/lm/un.lowercased.ar -lm work/lm/un.lm Number of grams The input file The output language model
  9. 9. Step 7: Train Phrase Model <ul><ul><li>Go to “Train-model” located at C:cygwinhomeAgalaldemotoolsbinmoses-scriptsscripts-20111126-2011training </li></ul></ul><ul><ul><li>Change line number 39 to </li></ul></ul><ul><ul><li>my $BINDIR=&quot;/home/agalal/demo/tools/bin&quot;; </li></ul></ul><ul><ul><li>Write the following command in cygwin window in one line: </li></ul></ul><ul><ul><li>Wait till you see (9) create moses.ini @ XXXXXXX ~ 30 min depending on the size of your data </li></ul></ul>Change it according to the folder name in your computer <ul><ul><li>tools/bin/moses-scripts/scripts-20111126-2011/training/train-model.perl –scripts-root-dir tools/bin/moses-scripts/scripts-20111126-2011 </li></ul></ul><ul><ul><li>– root-dir work –corpus work/corpus/un.lowercased –f en –e ar -alignment grow-diag-final-and -reordering msd-bidirectional-fe -lm 0:3:/home/agalal/demo/work/lm/un.lm </li></ul></ul>Foreign language Source language Language Model
  10. 10. Step 8: Translate ! <ul><ul><li>Put the English file (for example: un.en) that you want to translate at: C:cygwinhomeagalaldemo </li></ul></ul><ul><ul><li>Write the following command in cygwin: </li></ul></ul><ul><ul><li>3. Check the results at the following directory C:cygwinhomeagalaldemoout.txt </li></ul></ul><ul><ul><li>Tools/moses/moses-cmd/src/moses –config work/model/moses.ini –input-file in.en 1> out.txt </li></ul></ul>
  11. 11. Thank You!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×