{"id":235,"date":"2017-11-27T04:01:32","date_gmt":"2017-11-27T04:01:32","guid":{"rendered":"http:\/\/achrafothman.net\/site\/?p=235"},"modified":"2021-10-18T03:55:14","modified_gmt":"2021-10-18T03:55:14","slug":"how-to-install-moses-statistical-machine-translation-in-ubuntu","status":"publish","type":"post","link":"https:\/\/achrafothman.net\/site\/how-to-install-moses-statistical-machine-translation-in-ubuntu\/","title":{"rendered":"How to install Moses (Statistical Machine Translation) on Ubuntu?"},"content":{"rendered":"<p>In this article, I will show you how to install and build <a href=\"http:\/\/www.statmt.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Moses<\/a> on Ubuntu, and how to use Moses to translate with some simple models (English and Sign Language Gloss). If you experience problems, then please contact me.<\/p>\n<p>If you\u2019re just writing about this work, please cite this paper as follow:<\/p>\n<blockquote style=\"font-size: 15px;\"><p>Achraf Othman, Mohamed Jemni, \u201c<a href=\"http:\/\/www.achrafothman.net\/aslsmt\/Designing-High-Accuracy-Statistical-Machine-Translation-for-Sign-Language-Using-Parallel-Corpus_-Case-Study-English-and-American-Sign-Language.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">Designing High Accuracy Statistical Machine Translation for Sign Language Using Parallel Corpus\u2014Case study English and American Sign Language<\/a> \u201c, Journal of Information Technology Research, Volume 12, Issue 2, 2019.<\/p><\/blockquote>\n<h2>Part 1 &#8211; Installing Moses and Giza++<!--more--><\/h2>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/88UXtB9tnbc\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<ol>\n<li>Login as a root<\/li>\n<li>Navigate to user directory<\/li>\n<li>Create a workplace<br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>mkdir\u00a0smt<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong> cd smt<\/strong><\/span><\/li>\n<li>Install required packages<br \/>\n<strong style=\"margin-left: 50px;\"><span style=\"color: #993300;\">sudo apt-get install build-essential git-core pkg-config automake libtool wget zlib1g-dev python-dev libbz2-dev<\/span><\/strong><\/li>\n<li>Install required packages for regression step<br \/>\n<strong style=\"margin-left: 50px;\"><span style=\"color: #993300;\">sudo apt-get install libsoap-lite-perl<\/span><\/strong><\/li>\n<li>Clone\u00a0Moses from <a href=\"https:\/\/github.com\/moses-smt\/mosesdecoder\" target=\"_blank\" rel=\"noopener noreferrer\">Github<\/a><br \/>\n<span style=\"color: #993300;\"><strong style=\"margin-left: 50px;\">git clone https:\/\/github.com\/moses-smt\/mosesdecoder.git<\/strong><\/span><\/li>\n<li>Download &amp; Install <a href=\"https:\/\/github.com\/moses-smt\/giza-pp\" target=\"_blank\" rel=\"noopener noreferrer\">GIZA++<\/a><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>git clone https:\/\/github.com\/moses-smt\/giza-pp.git<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>cd giza-pp<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>make<\/strong><\/span><\/li>\n<li>Copying GIZA++ Binaries to MosesDecoder<br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>cd ..\/mosesdecoder<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>mkdir tools<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>cp ..\/giza-pp\/GIZA++-v2\/GIZA++ ..\/giza-pp\/GIZA++-v2\/snt2cooc.out ..\/giza-pp\/mkcls-v2\/mkcls tools<\/strong><\/span><br \/>\n<strong><span style=\"color: #993300; margin-left: 50px;\">cd ..<\/span><\/strong><\/li>\n<\/ol>\n<h2>Part 2 &#8211; Installing IRSTLM<\/h2>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/7QA9quB3IZA\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<ol>\n<li>Install IRSTLM 5.80.08 (Download &amp; Extract IRSTLM from <a href=\"https:\/\/sourceforge.net\/projects\/irstlm\/files\/irstlm\/irstlm-5.80\/irstlm-5.80.08.tgz\/download\" target=\"_blank\" rel=\"noopener noreferrer\">SourceForge,<\/a>\u00a0to your home directory)<br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>mkdir irstlm<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>cd irstlm-5.80.08<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>cd trunk<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>.\/regenerate-makefiles.sh<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>.\/configure &#8211;prefix=$HOME\/irstlm<\/strong><\/span> [$HOME = the path where you want to install irstlm]<br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>make install<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>cd ..<br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>cd ..<\/strong><\/span><\/strong><\/span><\/li>\n<\/ol>\n<p><span style=\"color: #993300; font-size: 90%;\"><cite>if you are facing challenging to make files like &#8220;<em>cstdlib &#8211; fatal error: stdlib.h: No such file or directory<\/em>&#8220;, please watch the video to see how to downgrade the version of gcc and g++ in order to build IRSTLM 5.80.08 successfully.<\/cite><\/span><\/p>\n<h2>Part 3 &#8211; Installing Boost, CMPH, and, XML-RPC<\/h2>\n<ol>\n<li>Install Boost 1.64\u00a0 (This may take a lot of time! be patient \ud83d\ude09 )<br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>wget https:\/\/dl.bintray.com\/boostorg\/release\/1.72.0\/source\/boost_1_72_0.tar.gz<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong> tar zxvf boost_1_72_0.tar.gz <\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong> cd boost_1_72_0\/<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong> .\/bootstrap.sh <\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong> .\/b2\u00a0 &#8211;layout=system link=static install || echo FAILURE<br \/>\n<\/strong><\/span><span style=\"color: #993300; margin-left: 50px;\"><strong>cd ..<br \/>\n<\/strong><\/span><\/li>\n<li>install\u00a0CMPH2.0<br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>wget http:\/\/www.achrafothman.net\/aslsmt\/tools\/cmph_2.0.orig.tar.gz<br \/>\n<\/strong><\/span><span style=\"color: #993300; margin-left: 50px;\"><strong>tar zxvf\u00a0cmph_2.0.orig.tar.gz<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>cd cmph-2.0\/<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>.\/configure<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>make<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>make install<\/strong><\/span><\/li>\n<li>install XML-RPC<br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>wget http:\/\/www.achrafothman.net\/aslsmt\/tools\/xmlrpc-c_1.33.14.orig.tar.gz<br \/>\n<\/strong><\/span><span style=\"color: #993300; margin-left: 50px;\"><strong>tar zxvf xmlrpc-c_1.33.14.orig.tar.gz<br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>cd xmlrpc-c-1.33.14\/<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>.\/configure<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>make<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>make install<br \/>\n<\/strong><\/span><span style=\"color: #993300; margin-left: 50px;\"><strong>cd ..<\/strong><\/span><span style=\"color: #993300; margin-left: 50px;\"><strong><br \/>\n<\/strong><\/span><\/strong><\/span><\/li>\n<li>Install Moses (This may take a lot of time! \ud83d\ude2f )<br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>cd mosesdecoder<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>make -f contrib\/Makefiles\/install-dependencies.gmake<\/strong><\/span><br \/>\n<span style=\"color: #993300; margin-left: 50px;\"><strong>.\/bjam &#8211;with-boost=..\/boost_1_72_0 &#8211;with-cmph=..\/cmph-2.0 &#8211;with-irstlm=..\/irstlm\u00a0<\/strong><\/span><\/li>\n<\/ol>\n<p>The next step is to train models and test our statistical machine translation.<\/p>\n<p>If you\u2019re just writing about this work, please cite this paper as follow:<\/p>\n<blockquote style=\"font-size: 15px;\"><p>Achraf Othman, Mohamed Jemni, \u201c<a href=\"http:\/\/www.achrafothman.net\/aslsmt\/Designing-High-Accuracy-Statistical-Machine-Translation-for-Sign-Language-Using-Parallel-Corpus_-Case-Study-English-and-American-Sign-Language.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">Designing High Accuracy Statistical Machine Translation for Sign Language Using Parallel Corpus\u2014Case study English and American Sign Language<\/a> \u201c, Journal of Information Technology Research, Volume 12, Issue 2, 2019.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>In this article, I will show you how to install and build Moses on Ubuntu, and how to use Moses to translate with some simple models (English and Sign Language Gloss). If you experience problems, then please contact me. If you\u2019re just writing about this work, please cite this paper as follow: Achraf Othman, Mohamed<\/p>\n","protected":false},"author":1,"featured_media":240,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"_uag_custom_page_level_css":""},"categories":[4],"tags":[86,25,87,90,88,89],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?fit=640%2C400&ssl=1","uagb_featured_image_src":{"full":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?fit=640%2C400&ssl=1",640,400,false],"thumbnail":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?resize=150%2C150&ssl=1",150,150,true],"medium":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?fit=300%2C188&ssl=1",300,188,true],"medium_large":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?fit=640%2C400&ssl=1",640,400,true],"large":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?fit=640%2C400&ssl=1",640,400,true],"1536x1536":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?fit=640%2C400&ssl=1",640,400,true],"2048x2048":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?fit=640%2C400&ssl=1",640,400,true],"post-thumbnail":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?resize=270%2C169&ssl=1",270,169,true],"contentberg-main":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?resize=640%2C400&ssl=1",640,400,true],"contentberg-main-full":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?resize=640%2C400&ssl=1",640,400,true],"contentberg-slider-stylish":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?resize=640%2C400&ssl=1",640,400,true],"contentberg-slider-carousel":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?resize=370%2C370&ssl=1",370,370,true],"contentberg-slider-grid-b":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?resize=554%2C400&ssl=1",554,400,true],"contentberg-slider-grid-b-sm":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?resize=306%2C400&ssl=1",306,400,true],"contentberg-slider-bold-sm":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?resize=150%2C150&ssl=1",150,150,true],"contentberg-grid":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?resize=370%2C245&ssl=1",370,245,true],"contentberg-list":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?resize=260%2C200&ssl=1",260,200,true],"contentberg-list-b":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?resize=370%2C305&ssl=1",370,305,true],"contentberg-thumb":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?resize=87%2C67&ssl=1",87,67,true],"contentberg-thumb-alt":["https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/tuto-1.jpg?resize=150%2C150&ssl=1",150,150,true]},"uagb_author_info":{"display_name":"Achraf Othman","author_link":"https:\/\/achrafothman.net\/site\/author\/achraf-othman\/"},"uagb_comment_info":10,"uagb_excerpt":"In this article, I will show you how to install and build Moses on Ubuntu, and how to use Moses to translate with some simple models (English and Sign Language Gloss). If you experience problems, then please contact me. If you\u2019re just writing about this work, please cite this paper as follow: Achraf Othman, Mohamed","jetpack_shortlink":"https:\/\/wp.me\/p8KjJN-3N","jetpack-related-posts":[{"id":31,"url":"https:\/\/achrafothman.net\/site\/statistical-sign-language-machine-translation-from-english-written-text-to-american-sign-language-gloss\/","url_meta":{"origin":235,"position":0},"title":"Statistical sign language machine translation: from english written text to american sign language gloss","date":"September 19, 2011","format":"image","excerpt":"This works aims to design a statistical machine translation from English text to American Sign Language (ASL). The system is based on Moses tool with some modifications and the results are synthesized through a 3D avatar for interpretation. First, we translate the input text to gloss, a written form of\u2026","rel":"","context":"In &quot;Blog&quot;","img":{"alt_text":"Statistical Machine Translation for sign language","src":"https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/smt.png?fit=768%2C425&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":500,"url":"https:\/\/achrafothman.net\/site\/deployment-of-a-statistical-machine-translation-english-american-sign-language\/","url_meta":{"origin":235,"position":1},"title":"Deployment of a Statistical Machine Translation (English &#038; American Sign Language)","date":"May 17, 2020","format":false,"excerpt":"Hello! In this tutorial, you will be able to deploy your statistical machine translation for the pair of language English and American Sign Language in written form. If you want to cite my work in your research papers, please refer to this publication: Achraf Othman, Mohamed Jemni, \u201cDesigning High Accuracy\u2026","rel":"","context":"In &quot;Tutorials&quot;","img":{"alt_text":"Deployment of a Statistical Machine Translation English-American Sign Language","src":"https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/smt-tutorial.png?fit=600%2C400&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":396,"url":"https:\/\/achrafothman.net\/site\/youtube-tutorial-serie-1-deployment-of-a-statistical-machine-translation\/","url_meta":{"origin":235,"position":2},"title":"Youtube Tutorial Serie 1- Deployment of a statistical machine translation using Moses and Giza++","date":"April 18, 2020","format":false,"excerpt":"","rel":"","context":"In &quot;Blog&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/video-1.jpg?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":337,"url":"https:\/\/achrafothman.net\/site\/machine-translation-for-sign-language\/","url_meta":{"origin":235,"position":3},"title":"New Journal Publication: Designing High Accuracy Statistical Machine Translation for Sign Language","date":"March 12, 2019","format":"image","excerpt":"In this article, the authors deal with the machine translation of written English text to sign language. They study the existing systems and issues in order to propose an implantation of a statistical machine translation from written English text to American Sign Language (English\/ASL) taking care of several features of\u2026","rel":"","context":"In &quot;Blog&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/dd.png?fit=750%2C438&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":118,"url":"https:\/\/achrafothman.net\/site\/phd-defense\/","url_meta":{"origin":235,"position":4},"title":"PhD Defense: \u201cMachine Translation for Sign Language based on Statistical Approach\u201c","date":"May 18, 2017","format":"image","excerpt":"I am happy to report that on March\u00a010, 2017, I had my doctoral dissertation defense, as part of the WebSign project, and that the committee found my research to be worthy. My dissertation was titled \u201cMachine Translation for Sign Language based on Statistical Approach\u201d and was based on translation between\u2026","rel":"","context":"In &quot;Blog&quot;","img":{"alt_text":"PhD Defence Dr. Achraf Othman","src":"https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/17157361_10211187722864810_4042370163602591668_o.jpg?fit=1200%2C900&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":942,"url":"https:\/\/achrafothman.net\/site\/overview-of-text-to-gloss-in-computational-sign-language-processing-slp\/","url_meta":{"origin":235,"position":5},"title":"Overview of Text-to-Gloss in Computational Sign Language Processing (SLP)","date":"August 9, 2021","format":false,"excerpt":"Authors: Achraf Othman Research and Innovation Letters \u2022 Volume 1 \u2022 Issue 1 \u2022 August 2021 \u2022 Published: August 9, 2021 \u2022 PDF Abstract- Digital Accessibility to the content in web environments for people with hearing disabilities and with hearing impairment with a low level of literacy is becoming increasingly\u2026","rel":"","context":"In &quot;Research and Innovation Letters&quot;","img":{"alt_text":"Using Gloss in Sign Language","src":"https:\/\/i0.wp.com\/achrafothman.net\/site\/wp-content\/uploads\/signlanguagegloss.png?fit=1024%2C683&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/achrafothman.net\/site\/wp-json\/wp\/v2\/posts\/235"}],"collection":[{"href":"https:\/\/achrafothman.net\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/achrafothman.net\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/achrafothman.net\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/achrafothman.net\/site\/wp-json\/wp\/v2\/comments?post=235"}],"version-history":[{"count":44,"href":"https:\/\/achrafothman.net\/site\/wp-json\/wp\/v2\/posts\/235\/revisions"}],"predecessor-version":[{"id":440,"href":"https:\/\/achrafothman.net\/site\/wp-json\/wp\/v2\/posts\/235\/revisions\/440"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/achrafothman.net\/site\/wp-json\/wp\/v2\/media\/240"}],"wp:attachment":[{"href":"https:\/\/achrafothman.net\/site\/wp-json\/wp\/v2\/media?parent=235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/achrafothman.net\/site\/wp-json\/wp\/v2\/categories?post=235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/achrafothman.net\/site\/wp-json\/wp\/v2\/tags?post=235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}