Build Moses Statistical Machine Translation system with Ubuntu
Tree to tree Machine Translation with Universal phrase tagset. https://github.com/aaronlifenghan/A-Universal-Phrase-Tagset
Project 2 how to install and compile os161Xiao Qin
README: After installed VirtualBox on my Windows machine, I installed CentOS 6.5 on VirtualBox. Next, I successfully installed cs161-binutils-1.4 and cs161-gcc-1.5.tar. Unfortunately, I encountered an error "configure: error: no termcap library found". As Dustin suggested, installing the missing package can solve this problem. Please use the following command to install the package:
yum install ncurses-devel
You don't have to install CentOS 6.5, because I believe that you can install all the OS161 tools on CentOS 7. You don't have to install VirtualBox neither. Nevertheless, if you decide to install CentOS on VirtualBox, please refer to my installation log below.
This is a mashup from following slideshare presentations.
http://www.slideshare.net/buk0wsk1/drush-more-beer-less-effort
http://www.slideshare.net/jdschroeder/drush-5186087
I rebuilt the kernel by adding "hello world!" into the boot message. In what follows, I summarize my process of rebuilding the OS161 kernel. You may also found the three common mistakes at the end of this document.
Note: I rebuilt the kernel by adding "hello world!" into the boot message. In what follows, I summarize my process of rebuilding the OS161 kernel. You may also found the three common mistakes at the end of this document.
Project 2 how to install and compile os161Xiao Qin
README: After installed VirtualBox on my Windows machine, I installed CentOS 6.5 on VirtualBox. Next, I successfully installed cs161-binutils-1.4 and cs161-gcc-1.5.tar. Unfortunately, I encountered an error "configure: error: no termcap library found". As Dustin suggested, installing the missing package can solve this problem. Please use the following command to install the package:
yum install ncurses-devel
You don't have to install CentOS 6.5, because I believe that you can install all the OS161 tools on CentOS 7. You don't have to install VirtualBox neither. Nevertheless, if you decide to install CentOS on VirtualBox, please refer to my installation log below.
This is a mashup from following slideshare presentations.
http://www.slideshare.net/buk0wsk1/drush-more-beer-less-effort
http://www.slideshare.net/jdschroeder/drush-5186087
I rebuilt the kernel by adding "hello world!" into the boot message. In what follows, I summarize my process of rebuilding the OS161 kernel. You may also found the three common mistakes at the end of this document.
Note: I rebuilt the kernel by adding "hello world!" into the boot message. In what follows, I summarize my process of rebuilding the OS161 kernel. You may also found the three common mistakes at the end of this document.
Describes steps to deploy a single node of IBM Sametime 9 on AIX® 7.1 systems, including:
-- Preparing the environment prior to installation
-- Screen shots of the user interface during the configuration of each component
-- Common problems encountered during deployment
Note that this document supplements but does not replace the official Sametime 9 technical documentation. http://www-01.ibm.com/support/knowledgecenter/SSKTXQ_9.0.0/welcome/welcome.html
Runs scored by Players Analysis with Flume and PigNitesh Ghosh
This is data for runs scored by players in different countries in different years. Let’s assume some external process is writing data into a directory in CSV format, Write a flume configuration to copy this data to HDFS using flume and then write a PIG script to process data using PIG to find out sum of run scored and balls played by each player.
Known Incidences
License Manager 1.31
Causes
Your machine is missing one or more required Microsoft prerequisites.
Solution 1: Install Prerequisites before License Manager
a. Download and install the Microsoft .NET 4.0 Framework Full.
b. Download and install the Microsoft Visual C++ Redistributables 2010 (x86)
c. Re-launch the License Manager installer
Solution 2: Upgrade the License Manager to 1.33
a. Install License Manager 1.33 (or better).
WMT2022 Biomedical MT PPT: Logrus Global and Uni ManchesterLifeng (Aaron) Han
Pre-trained language models (PLMs) often take
advantage of the monolingual and multilingual
dataset that is freely available online to acquire
general or mixed domain knowledge before
deployment into specific tasks. Extra-large
PLMs (xLPLMs) are proposed very recently
to claim supreme performances over smallersized PLMs such as in machine translation
(MT) tasks. These xLPLMs include Meta-AI’s
wmt21-dense-24-wide-en-X (2021) and NLLB
(2022). In this work, we examine if xLPLMs are
absolutely superior to smaller-sized PLMs in
fine-tuning toward domain-specific MTs. We
use two different in-domain data of different
sizes: commercial automotive in-house data
and clinical shared task data from the ClinSpEn2022 challenge at WMT2022. We choose
popular Marian Helsinki as smaller sized PLM
and two massive-sized Mega-Transformers
from Meta-AI as xLPLMs.
Our experimental investigation shows that 1)
on smaller sized in-domain commercial automotive data, xLPLM wmt21-dense-24-wideen-X indeed shows much better evaluation
scores using SACREBLEU and hLEPOR metrics than smaller-sized Marian, even though
its score increase rate is lower than Marian
after fine-tuning; 2) on relatively larger-size
well prepared clinical data fine-tuning, the
xLPLM NLLB tends to lose its advantage
over smaller-sized Marian on two sub-tasks
(clinical terms and ontology concepts) using
ClinSpEn offered metrics METEOR, COMET,
and ROUGE-L, and totally lost to Marian on
Task-1 (clinical cases) on all official metrics
including SACREBLEU and BLEU; 3) metrics do not always agree with each other
on the same tasks using the same model outputs; 4) clinic-Marian ranked No.2 on Task-1
(via SACREBLEU/BLEU) and Task-3 (via METEOR and ROUGE) among all submissions.
Measuring Uncertainty in Translation Quality Evaluation (TQE)Lifeng (Aaron) Han
From both human translators (HT) and machine translation (MT) researchers' point of view, translation quality evaluation (TQE) is an essential task. Translation service providers (TSPs) have to deliver large volumes of translations which meet customer specifications with harsh constraints of required quality level in tight time-frames and costs. MT researchers strive to make their models better, which also requires reliable quality evaluation. While automatic machine translation evaluation (MTE) metrics and quality estimation (QE) tools are widely available and easy to access, existing automated tools are not good enough, and human assessment from professional translators (HAPs) are often chosen as the golden standard \cite{han-etal-2021-TQA}.
Human evaluations, however, are often accused of having low reliability and agreement. Is this caused by subjectivity or statistics is at play? How to avoid the entire text to be checked and be more efficient with TQE from cost and efficiency perspectives, and what is the optimal sample size of the translated text, so as to reliably estimate the translation quality of the entire material? This work carries out such a motivated research to correctly estimate the confidence intervals \cite{Brown_etal2001Interval}
depending on the sample size of translated text, e.g. the amount of words or sentences, that needs to be processed on TQE workflow step for confident and reliable evaluation of overall translation quality.
The methodology we applied for this work is from Bernoulli Statistical Distribution Modeling (BSDM) and Monte Carlo Sampling Analysis (MCSA).
Reference: S Gladkoff, I Sorokina, L Han, A Alekseeva. 2022. Measuring Uncertainty in Translation Quality Evaluation (TQE). LREC2022. arXiv preprint arXiv:2111.07699
Meta-Evaluation of Translation Evaluation Methods: a systematic up-to-date ov...Lifeng (Aaron) Han
Starting from 1950s, Machine Translation (MT) was challenged from different scientific solutions which included rule-based methods, example-based and statistical models (SMT), to hybrid models, and very recent years the neural models (NMT).
While NMT has achieved a huge quality improvement in comparison to conventional methodologies, by taking advantages of huge amount of parallel corpora available from internet and the recently developed super computational power support with an acceptable cost, it struggles to achieve real human parity in many domains and most language pairs, if not all of them.
Alongside the long road of MT research and development, quality evaluation metrics played very important roles in MT advancement and evolution.
In this tutorial, we overview the traditional human judgement criteria, automatic evaluation metrics, unsupervised quality estimation models, as well as the meta-evaluation of the evaluation methods. Among these, we will also cover the very recent work in the MT evaluation (MTE) fields taking advantages of large size of pre-trained language models for automatic metric customisation towards exactly deployed language pairs and domains. In addition, we also introduce the statistical confidence estimation regarding sample size needed for human evaluation in real practice simulation.
HOPE: A Task-Oriented and Human-Centric Evaluation Framework Using Profession...Lifeng (Aaron) Han
Traditional automatic evaluation metrics for machine translation have been widely criticized by linguists due to their low accuracy, lack of transparency, focus on language mechanics rather than semantics, and low agreement with human quality evaluation. Human evaluations in the form of MQM-like scorecards have always been carried out in real industry setting by both clients and translation service providers (TSPs). However, traditional human translation quality evaluations are costly to perform and go into great linguistic detail, raise issues as to
inter-rater reliability (IRR) and are not designed to measure quality of worse than premium quality translations.
In this work, we introduce \textbf{HOPE}, a task-oriented and \textit{\textbf{h}}uman-centric evaluation framework for machine translation output based \textit{\textbf{o}}n professional \textit{\textbf{p}}ost-\textit{\textbf{e}}diting annotations. It contains only a limited number of commonly occurring error types, and uses a scoring model with geometric progression of error penalty points (EPPs) reflecting error severity level to each translation unit.
The initial experimental work carried out on English-Russian language pair MT outputs on marketing content type of text from highly technical domain reveals that our evaluation framework is quite effective in reflecting the MT output quality regarding both overall system-level performance and segment-level transparency, and it increases the IRR for error type interpretation.
The approach has several key advantages, such as ability to measure and compare less than perfect MT output from different systems, ability to indicate human perception of quality, immediate estimation of the labor effort required to bring MT output to premium quality, low-cost and faster application, as well as higher IRR. Our experimental data is available at \url{https://github.com/lHan87/HOPE}
HOPE: A Task-Oriented and Human-Centric Evaluation Framework Using Professio...Lifeng (Aaron) Han
Traditional automatic evaluation metrics for machine translation have been widely criticized by linguists due to their low accuracy, lack of transparency, focus on language mechanics rather than semantics, and low agreement with human quality evaluation. Human evaluations in the form of MQM-like scorecards have always been carried out in real industry setting by both clients and translation service providers (TSPs). However, traditional human translation quality evaluations are costly to perform and go into great linguistic detail, raise issues as to inter-rater reliability (IRR) and are not designed to measure quality of worse than premium quality translations. In this work, we introduce HOPE, a task-oriented and human-centric evaluation framework for machine translation output based on professional post-editing annotations. It contains only a limited number of commonly occurring error types, and use a scoring model with geometric progression of error penalty points (EPPs) reflecting error severity level to each translation unit. The initial experimental work carried out on English-Russian language pair MT outputs on marketing content type of text from highly technical domain reveals that our evaluation framework is quite effective in reflecting the MT output quality regarding both overall system-level performance and segment-level transparency, and it increases the IRR for error type interpretation. The approach has several key advantages, such as ability to measure and compare less than perfect MT output from different systems, ability to indicate human perception of quality, immediate estimation of the labor effort required to bring MT output to premium quality, low-cost and faster application, as well as higher IRR. Our experimental data is available at \url{this https URL}.
Meta-evaluation of machine translation evaluation methodsLifeng (Aaron) Han
Cite: Lifeng Han. 2021. Meta-evaluation of machine translation evaluation methods. In Metrics2021 Tutorial Track/type: Workshop on Informetric and Scientometric Research (SIG-MET), ASIS&T. October 23–24.
Apply chinese radicals into neural machine translation: deeper than character...Lifeng (Aaron) Han
LPRC 2018: Limerick Postgraduate Research Conference
Lifeng Han and Shaohui Kuang. 2018. Apply Chinese radicals into neural machine translation: Deeper than character level. ArXiv pre-print https://arxiv.org/abs/1805.01565v1
Chinese Character Decomposition for Neural MT with Multi-Word ExpressionsLifeng (Aaron) Han
ADAPT seminar series. June 2021
research papers @NoDaLiDa2021:the 23rd Nordic Conference on Computational Linguistics
& COLING20:MWE-LEX WS
Bonus takeaway:
AlphaMWE multilingual corpus
with MWEs
Detection of Verbal Multi-Word Expressions via Conditional Random Fields with...Lifeng (Aaron) Han
ADAPT Centre & Detection of Verbal Multi-Word Expressions via Conditional Random Fields with Syntactic Dependency Features and Semantic Re-Ranking @ DLSS2017 Bilbao.
AlphaMWE: Construction of Multilingual Parallel Corpora with MWE Annotations ...Lifeng (Aaron) Han
In this work, we present the construction of multilingual parallel corpora with annotation of multiword expressions (MWEs). MWEs include verbal MWEs (vMWEs) defined in the PARSEME shared task that have a verb as the head of the studied terms. The annotated vMWEs are also bilingually and multilingually aligned manually. The languages covered include English, Chinese, Polish, and German. Our original English corpus is taken from the PARSEME shared task in 2018. We performed machine translation of this source corpus followed by human post editing and annotation of target MWEs. Strict quality control was applied for error limitation, i.e., each MT output sentence received first manual post editing and annotation plus second manual quality rechecking. One of our findings during corpora preparation is that accurate translation of MWEs presents challenges to MT systems. To facilitate further MT research, we present a categorisation of the error types encountered by MT systems in performing MWE related translation. To acquire a broader view of MT issues, we selected four popular state-of-the-art MT models for comparisons namely: Microsoft Bing Translator, GoogleMT, Baidu Fanyi and DeepL MT. Because of the noise removal, translation post editing and MWE annotation by human professionals, we believe our AlphaMWE dataset will be an asset for cross-lingual and multilingual research, such as MT and information extraction. Our multilingual corpora are available as open access at github.com/poethan/AlphaMWE
ADAPT Centre and My NLP journey: MT, MTE, QE, MWE, NER, Treebanks, Parsing.Lifeng (Aaron) Han
Invited Presentation in NLP lab of Soochow University, about my NLP journey and ADAPT Centre. NLP part covers Machine Translation Evaluation, Quality Estimation, Multiword Expression Identification, Named Entity Recognition, Word Segmentation, Treebanks, Parsing.
A deep analysis of Multi-word Expression and Machine TranslationLifeng (Aaron) Han
A deep analysis of Multi-word Expression and Machine Translation. Faculty research open day. DCU, Dublin. 2019.
Including MWE identification, MT with radical, MTE.
Quality Estimation for Machine Translation Using the Joint Method of Evaluati...Lifeng (Aaron) Han
This is a short presentation for the Poster of WMT13 shared task: This paper is to introduce our participation in
the WMT13 shared tasks on Quality Estimation
for machine translation without using reference
translations. We submitted the results
for Task 1.1 (sentence-level quality estimation),
Task 1.2 (system selection) and Task 2
(word-level quality estimation). In Task 1.1,
we used an enhanced version of BLEU metric
without using reference translations to evaluate
the translation quality. In Task 1.2, we utilized
a probability model Naïve Bayes (NB) as
a classification algorithm with the features
borrowed from the traditional evaluation metrics.
In Task 2, to take the contextual information
into account, we employed a discriminative
undirected probabilistic graphical model
Conditional random field (CRF), in addition
to the NB algorithm. The training experiments
on the past WMT corpora showed that the designed
methods of this paper yielded promising
results especially the statistical models of
CRF and NB. The official results show that
our CRF model achieved the highest F-score
0.8297 in binary classification of Task 2.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Leading Change strategies and insights for effective change management pdf 1.pdf
Build moses on ubuntu (64 bit) system in virtubox recorded by aaron _v2longer
1. Build Moses on Ubuntu (64-bit) in VirtualBox and 186-server: recorded by Aaron
[ http://www.linkedin.com/in/aaronhan ]
This document introduces the record by Aaron when running Moses translation systems
(http://www.statmt.org/moses/). If you want to get more information about the Moses please see the
official website of Moses or Moses-manual.pdf (http://www.statmt.org/moses/manual/manual.pdf).
Contents
Install Moses MT system and run an example:............................................................................................ 3
Another way to install GIZA++:.................................................................................................................... 9
Another way to install IRSTLM:.................................................................................................................. 10
Corpus preparation:...................................................................................................................................10
Language model training (built on the target language to ensure fluent output translation):..................12
Training translation system (run word alignment, phrase extraction and scoring, create lexicalized
reordering tables and create Moses configuration file):............................................................................15
Tuning translation system:......................................................................................................................... 20
Testing the translation model:................................................................................................................... 25
Then we translate the testing corpus and score the translation quality using BLEU metric:.................31
Trial of Tree to tree translation using Moses:............................................................................................ 33
Build ZH->EN Tree to tree translation using Moses:.................................................................................. 41
Prepare corpus:..................................................................................................................................... 41
Training language model:.......................................................................................................................43
Training translation model:.................................................................................................................... 43
Testing:.................................................................................................................................................. 46
Preparing larger corpus-2...................................................................................................................... 48
Training translation model-2:.................................................................................................................49
Testing-2................................................................................................................................................ 51
Calculate the testing score using BLEU:................................................................................................. 53
Preparing larger corpus-2-Uni-phrase-tags............................................................................................54
Training translation model-2-Uni-phrase-tags....................................................................................... 55
Testing-2-Uni-phrase-tags...................................................................................................................... 56
Calculate the testing score using BLEU:................................................................................................. 58
2. Preparing larger corpus-3...................................................................................................................... 58
Training translation model-3..................................................................................................................59
Testing-3:............................................................................................................................................... 62
Calculate the testing score using BLEU:................................................................................................. 65
Tuning using 100001st
-110000th sentences-3.......................................................................................65
Tuning on nlp2ct-186-sever................................................................................................................... 68
Preparing larger corpus-3-uni-phrse-tags.............................................................................................. 72
Training translation model-3-uni-phrase-tags........................................................................................74
testing-3-uni-phrase-tags:......................................................................................................................75
Calculate the testing score using BLEU:................................................................................................. 77
Preparing larger corpus-4-186sever...................................................................................................... 77
Training translation model-4-186sever.................................................................................................. 77
Testing-4-186sever:............................................................................................................................... 79
Preparing larger corpus-4-Uni-186sever................................................................................................85
Training translation model-4-Uni-186sever........................................................................................... 85
Testing-4-uni-186sever:......................................................................................................................... 88
Build PT->CN tree-to-tree translation model with ori-phrase tags on 186-server:.....................................95
Train language model:........................................................................................................................... 95
Corpus for Training translation model:................................................................................................ 101
Prepare PT corpus:...........................................................................................................................101
Prepare the CN corpus:....................................................................................................................105
Training translation model use ori-tags:.............................................................................................. 106
Test translation model sue ori-tags:.................................................................................................106
Training translation model use uni-tags:..............................................................................................106
Test translation model sue uni-tags:................................................................................................ 106
Tune the MT system using LEPOR metric (external metric):.................................................................... 106
Reference:............................................................................................................................................... 107
3. Install Moses MT system and run an example:
1. Download virtual box from https://www.virtualbox.org/wiki/Downloads
2. Install virtual box by double click the “VirtualBox-4.2.18-88781-Win.exe” file. [To make the
Ubuntu fluent, take the following actions.
A1.download and install the VirtualBox Extension Pack outside the VM:
https://www.virtualbox.org/wiki/Downloads
A2.Ubuntu->Devices -> Install guest additions…]
3. Press “New” button to guide your “driver” (I use nlp2ct-Linux.vdi) into the virtual box. During the
selection, chose the Ubuntu64-bit. Setting the base memory around 7GB.
4. Press the “start” to lunch the Ubuntu system in the virtual box.
5. Download Giza++ (word alignment model) from https://code.google.com/p/giza-
pp/downloads/list
6. Download IRSTLM (language model) from http://hlt.fbk.eu/en/irstlm
7. Download Moses (Statistical Machine Translation decoder) from
http://www.statmt.org/moses/?n=Moses.Releases
8. Install the Giza++. If you store the Giza++ in the address Home/Aaron/Moses/giza-pp, open the
“Terminal”, get into this address (press “ls” to show the items under your current position; press
“cd xx” to enter the xx file; press “cd ..” to jump out current file), then press “make” command.
If show “g++ command not found”, type “g++”, then type “sudo apt-get install g++” to install g++.
After the install of g++, type “make” command to install Giza++ again.
4. 9. Install IRSTLM. Get into the location of the IRSTLM file. (install guideline
http://sourceforge.net/apps/mediawiki/irstlm/index.php?title=Installation_Guidelines) Type “sh
regenerate-makefiles.sh”. if shows “command not found aclocal failed” type “sudo apt-get install
automake”, if show “libtoolize: no such file” type “sudo apt-get install libtool”. Then type “bash
regenerate-makefiles.sh” again.
Type “./configure –prefix=/Home/Aaron/Moses/irstlm-5.80.03” to generate and locate the
“Makefile”
Type “make” for compilation. If show “zlib.h: No such file” type “sudo apt-get install zlib1g-dev”
to install zlib. Type “make” again.
Type “sudo make install” for installation.
5. The IRSTLM library and commands are generated respectively under the address
“/Home/Aaron/Moses/irstlm-5.80.03”
10. Install Boost (C++ libraries).
Download it from ( http://www.boost.org/users/history/version_1_52_0.html ).
cd boost_1_52_0
./bootstrap.sh –prefix=/Home/Aaron/Moses/boost_1_52_0
Type “./b2” to install boost.
6. 11. Install other dependencies (gcc, zlib, bzip2).
Type “sudo apt-get install build-essential libz-dev libbz2-dev” to install.
12. Install Moses.
Type “git clone git://github.com/moses-smt/mosesdecoder.git”.
Compile Moses. To examine the options you want, type “cd ~/mosesdecoder”, “./bjam --help”.
There will be automatic updates.
7. 13. Run Moses with an example.
Type the following commands to run the example:
cd ~/mosesdecoder
wget http://www.statmt.org/moses/download/sample-models.tgz
tar xzzf sample-models.tgz
cd sample-models
~/Aaron/Moses/mosesdecoder/bin/moses –f phrase-model/moses.ini < phrase-model/in > out
The translation results of source sentence “das ist ein kleines haus” will be shown in the file of
out as “it is a small house”. Succeed!
To test the Chart decoder, type the following command, the translation result will be shown in
out.stt file:
8. ~/Aaron/Moses/mosesdecoder/bin/moses_chart –f string-to-tree/moses.ini < string-to-tree/in >
out.stt
To test the tree-to-tree demo, type the following command, the translation result will be shown
in out.ttt file:
~/Aaron/Moses/mosesdecoder/bin/moses_chart –f tree-to-tree/moses.ini < tree-to-tree/in.xml
> out.ttt
9. ======================================================
Another way to install GIZA++:
Type the following commands to install GIZA++.
wget http://giza-pp.googlecode.com/files/giza-pp-v1.0.7.tar.gz
tar xzvf giza-pp-v1.0.7.tar.gz
cd giza-pp
make
above commands will create the binaries ~/giza-pp/GIZA++-v2/GIZA++, ~/giza-pp/GIZA++-
v2/snt2cooc.out and ~/giza-pp/mkcls-v2/mkcls. To automatically copy these files to somewhere
that Moses can find, type the following commands:
cd ~/mosesdecoder
mkdir tools
10. cp ~/Aaron/Moses/giza-pp/GIZA++-v2/GIZA++ ~/Aaron/Moses/giza-pp/GIZA++-v2/snt2cooc.out
~/Aaron/Moses/giza-pp/mkcls-v2/mkcls tools
above commands will copy the three binaries “GIZA++, snt2cooc.out, and mkcls” into the
directory “~/mosesdecoder/tools”.
When you come to run the training, you need to tell the training script where GIZA++ was
installed using the –external-bin-dir argument as below:
train-model.perl –external-bin-dir $HOME/mosesdecoder/tools
========================================================
Another way to install IRSTLM:
Download the latest version of IRSTLM.
tar zxvf irstlm-5.80.03.tgz
cd irstlm-5.80.03
./regenerate-makefiles.sh
./configure –prefix=$Home/Aaron/Moses/irstlm-5.80.03
sudo make install
========================================================
Corpus preparation:
mkdir corpus
cd corpus
wget http://www.statmt.org/wmt13/training-parallel-nc-v8.tgz
tar zxvf training-parallel-nc-v8.tgz
corpus tokenization (add spaces between words and punctuations):
type the following command for corpus tokenization:
~/Aaron/Moses/mosesdecoder/scripts/tokenizer/tokenizer.perl -l en <
~/Aaron/corpus/training/news-commentary-v8.fr-en.en > ~/Aaron/corpus/news-commentary-
v8.fr-en.tok.en
~/Aaron/Moses/mosesdecoder/scripts/tokenizer/tokenizer.perl -l fr <
~/Aaron/corpus/training/news-commentary-v8.fr-en.fr > ~/Aaron/corpus/news-commentary-
v8.fr-en.tok.fr
The tokenized files will be generated in the rectory file “~/Aaron/corpus”
Truecasing (to reduce data sparsity, convert the initial words of the sentence into the most
probable casing):
11. To get the truecasing training models that are the statistics data extracted from text, type the
following commands:
~/Aaron/Moses/mosesdecoder/scripts/recaser/train-truecaser.perl --model
~/Aaron/corpus/trucase-model.en --corpus ~/Aaron/corpus/news-commentary-v8.fr-en.tok.en
~/Aaron/Moses/mosesdecoder/scripts/recaser/train-truecaser.perl --model
~/Aaron/corpus/trucase-model.fr --corpus ~/Aaron/corpus/news-commentary-v8.fr-en.tok.fr
Above commands will generate the model files “truecase-model.en” and “truecase-model.fr”
under the directory “/Aaron/corpus”
Using the extracted truecasing training models to perform the truecase function as below
commands:
~/Aaron/Moses/mosesdecoder/scripts/recaser/truecase.perl --model ~/Aaron/corpus/trucase-
model.en < ~/Aaron/corpus/news-commentary-v8.fr-en.tok.en > ~/Aaron/corpus/news-
commentary-v8.fr-en.true.en
~/Aaron/Moses/mosesdecoder/scripts/recaser/truecase.perl --model ~/Aaron/corpus/trucase-
model.fr < ~/Aaron/corpus/news-commentary-v8.fr-en.tok.fr > ~/Aaron/corpus/news-
commentary-v8.fr-en.true.fr
Above commands will generate the files “news-commentary-v8.fr-en.true.ed” and “news-
commentary-v8.fr-en.true.fr” under directory “Aaron/corpus”
Cleaning (to remove the mis-aligned sentencs, long sentences and empty sentences, which
may cause problems with the training pipeline)
Type the following command to delete the sentences whose length is larger than 80:
~/Aaron/Moses/mosesdecoder/scripts/training/clean-corpus-n.perl ~/Aaron/corpus/news-
commentary-v8.fr-en.true fr en ~/Aaron/corpus/news-commentary-v8.fr-en.clean 1 80
The files “news-commentary-v8.fr-en.clean.en” and “news-commentary-v8.fr-en.clean.fr” will be
generated in the directory “~/Aaron/corpus”.
========================================================
12. Language model training (built on the target language to ensure fluent
output translation):
cd ~/Aaron
mkdir lm
cd lm
~/Aaron/Moses/irstlm-5.80.03/scripts/add-start-end.sh < ~/Aaron/corpus/news-commentary-
v8.fr-en.true.en > news-commentary-v8.fr-en.sb.en
The above commends will generate the file “news-commentary-v8.fr-en.sb.en” in the directory
“Aaron/lm”. In this file, each sentence is added with the start and end symbol “<s> </s>”.
Type the following command to generate the language model of English.
export IRSTLM=$Home/Aaron/Moses/irstlm-5.80.03; ~/Aaron/Moses/irstlm-
5.80.03/scripts/build-lm.sh –i news-commentary-v8.fr-en.sb.en –t ./tmp –p –s improved-kneser-
ney –o news-commentary-v8.fr-en.lm.en
Above commend generate the file “news-commentary-v8.fr-en.lm.en.gz” in the directory
“Aaron/lm”.
Type the following command to generate the file “news-commentary-v8.fr-en.arpa.en” in the
directory “Aaron/lm”
~/Aaron/Moses/irstlm-5.80.03/src/compile-lm –text news-commentary-v8.fr-en.lm.en.gz news-
commentary-v8.fr-en.arpa.en
13. To make the faster loading, type the following command to binary the arpa.en file
“~/Aaron/Moses/mosesdecoder/bin/build_binary news-commentary-v8.fr-en.arpa.en news-
commentary-v8.fr-en.blm.en”
To check the language model, type the following command: “$ echo “is this an English
sentence ?” | ~/Aaron/Moses/mosesdecoder/bin/query news-commentary-v8.fr-en.arpa.en”. it
will show the following result.
14. If using the following command: “$ echo “is this an English sentence ?” |
~/Aaron/Moses/mosesdecoder/bin/query news-commentary-v8.fr-en.blm.en”. it will show the
following result:
========================================================
Training translation system (run word alignment, phrase extraction and
scoring, create lexicalized reordering tables and create Moses
configuration file):
Type the following command to train the translation system using language model:
cd ~/Aaron
mkdir working
cd working
~/Aaron/Moses/mosesdecoder/scripts/training/train-model.perl -root-dir train -corpus
~/Aaron/corpus/news-commentary-v8.fr-en.clean -f fr -e en -alignment grow-diag-final-and
-reordering msd-bidirectional-fe -lm 0:3:$HOME/Aaron/lm/news-commentary-v8.fr-en.blm.en:8
-external-bin-dir ~/Aaron/Moses/mosesdecoder/tools >& training.out &
The running details are written into the ~/working/training.out file step by step as below:
15. If you want to see the running thread, type command “top” to show the running details in the
window as below:
Type command “ctrl+c” to shut down the current running (top) shown in the window as below
[type "ctrl+z" to pause the run; type "jobs" show the running; type "bg + job-num" to put the detail
background; type "fg + job-num" to show runing thread (bring to fore-ground) ]:
Around 2 hours and 10 minutes later, the translation training stage will be finished. By command
“ctrl+c”, the following figure show the cmd window content:
17. Type “fg 2”, it will show that the progress is finished:
There will be a “train” file generated at “~/Aaron/working/train”. The “train” file contains 4 files
including “corpus, giza.en-fr, giza.fr-en, and model”. The 4 files contain the below files
respectively:
18.
19. ========================================================
Tuning translation system:
The weights used by Moses to weight the different models against each other are not optimized,
as shown in the moses.ini file. To tune the parameters, it requires a small amount of parallel
data, which is separated from the training data.
First, we download the WMT08 data, tokenise and truecase the corpus. The WMT08 corpus is
used as development set in WMT12.
Make a mew file “tune” to store the tuning corpus, then
cd ~/corpus/tune
wget http://www.statmt.org/wmt12/dev.tgz
tar zxvf dev.tgz
~/Aaron/corpus/tune$ ~/Aaron/Moses/mosesdecoder/scripts/tokenizer/tokenizer.perl -l en <
dev/news-test2008.en > news-test2008.tok.en
~/Aaron/corpus/tune$ ~/Aaron/Moses/mosesdecoder/scripts/tokenizer/tokenizer.perl -l fr <
dev/news-test2008.en > news-test2008.tok.fr
~/Aaron/Moses/mosesdecoder/scripts/recaser/truecase.perl --model ~/Aaron/corpus/truecase-
model.en < news-test2008.tok.en > news-test2008.true.en
~/Aaron/Moses/mosesdecoder/scripts/recaser/truecase.perl --model ~/Aaron/corpus/truecase-
model.fr < news-test2008.tok.fr > news-test2008.true.fr
After above commands, there will be the following files generated for tuning:
20. Now, we begin the tuning stage using the MERT (minimum error rate training) method.
cd ~/Aaron/working
~/Aaron/Moses/mosesdecoder/scripts/training/mert-moses.pl ~/Aaron/corpus/tune/news-
test2008.true.fr ~/Aaron/corpus/tune/news-test2008.true.en
~/Aaron/Moses/mosesdecoder/bin/moses train/model/moses.ini --mertdir
~/Aaron/Moses/mosesdecoder/bin/ &> mert.out &
top,
Type “Ctrl+c” to exit the showing, “jobs” to show the job number, “ctrl+z” to pause the job, “fg
[num_job]” to show the running job foreground, “ps” to show running, the jobs are paused as
below:
To save the time, type the following command to run the tuning with 6 threads,
22. There will be one document “mert.out” generated under working file, at the same time, a “mert-
work” file containing the tuning results “moses.ini” is generated under working file as below:
Begin the tuning at 2013-10-29-17:00, finish the tuning and generate the “moses.ini” file at
2013-10-30-09:44, it takes around 16 hours (using 7 threads). The “moses.ini” file contains the
tuned parameters and other information as following:
24. ========================================================
Testing the translation model:
This stage is to test the translation quality of the built translation model. The translation quality
is measured by the automatic evaluation metric score, such as the metric BLEU(2002),
METEOR(2005), and LEOPR(2012), etc.
Type the command:
cd ~/Aaron
~/Aaron/Moses/mosesdecoder/bin/moses -f ~/Aaron/working/mert-work/moses.ini
It will take some minutes to show the finish the initializing LexicalReordering and reading phrase-
table as following:
25. Type a French sentence “c'est une petite maison.(//this is a small house.)” and “enter”, it will
translate it as below, which is not a fully translated sentence:
Type another French sentence “vous êtes beau (// you are handsome)”, it will translate it into
“you are beautiful” as below:
Type “ctrl+c” to exit the job.
To make the translation faster, we should binary the lexicalized reordering models and the
phrase-table.
26. mkdir ~/Aaron/working/binarised-model
Type the following command to binaries the phrase-table:
~/Aaron/Moses/mosesdecoder/bin/processPhraseTable -ttable 0 0 train/model/phrase-table.gz
-nscores 5 -out binarised-model/phrase-table
It will generate the following files:
To binary the lexical reordering-table, type the following command:
28. Using the binarised tables, the loading will be very fast using the following command:
~/Aaron/Moses/mosesdecoder/bin/moses -f ~/Aaron/working/binarised-model/moses.ini
If you type the above two french sentences again it will generate the same translations as
before.
Type the commands to prepare the testing data as below:
mkdir ~/Aaron/corpus/test
cd ~/corpus/test
~/Aaron/Moses/mosesdecoder/scripts/tokenizer/tokenizer.perl -l en
<~/Aaron/corpus/tune/dev/newstest2011.en > newstest2011.tok.en
~/Aaron/Moses/mosesdecoder/scripts/tokenizer/tokenizer.perl -l fr <
~/Aaron/corpus/tune/dev/newstest2011.fr > newstest2011.tok.fr
~/Aaron/Moses/mosesdecoder/scripts/recaser/truecase.perl --model ~/Aaron/corpus/truecase-
model.en < newstest2011.tok.en > newstest2011.true.en
~/Aaron/Moses/mosesdecoder/scripts/recaser/truecase.perl --model ~/Aaron/corpus/truecase-
model.fr < newstest2011.tok.fr > newstest2011.true.fr
To make the translation faster, we can filter the trained translation model to retain the entries
that are only needed to translate the offered test corpus:
VirtualBox:~/Aaron/working$ ~/Aaron/Moses/mosesdecoder/scripts/training/filter-model-
given-input.pl filtered-newstest2011 mert-work/moses.ini
~/Aaron/corpus/test/newstest2011.true.fr -Binarizer
~/Aaron/Moses/mosesdecoder/bin/processPhraseTable
The filtering and binary stage finished as below:
29. Above command will generate a “~/Aaron/working/filtered-newstest2011” file that contains the
following documents:
30. Then we translate the testing corpus and score the translation quality using
BLEU metric:
nlp2ct@nlp2ct-VirtualBox:~/Aaron/working$ ~/Aaron/Moses/mosesdecoder/bin/moses -f
~/Aaron/working/filtered-newstest2011/moses.ini < ~/Aaron/corpus/test/newstest2011.true.fr
> ~/Aaron/working/newstest2011.translated.en 2> ~/Aaron/working/newstest2011.out
It takes abound 25 minutes to finish the translation. There will be two documents generated
“~/working/newstest2011.out & ~/working/newstest2011.translated.en”.
The document newstest2011.translated.en contains the translated output sentences; the
document newstest2011.out contains the detailed translation procedure and its volume is
larger:
31. Type the following command to test the BLEU score of the automatic translation, as compared
with the reference translation:
VirtualBox:~/Aaron/working$ ~/Aaron/Moses/mosesdecoder/scripts/generic/multi-bleu.perl -lc
~/Aaron/corpus/test/newstest2011.true.en < ~/Aaron/working/newstest2011.translated.en
It shows that the BLEU score is 23.41.
============================================================
32. Trial of Tree to tree translation using Moses:
Install the chart decoder:
We already install the chart decoder as the executable file:
~/Aaron/Moses/mosesdecoder/bin/moses_chart
First use the following command to try the string to tree model:
The running will call the language model: ~/lm/europarl.srilm.gz
33.
34. It will generate the document “out.stt” and “translation-details.log” under the directory:
~/Aaron/Moses/sample-models
35. Secondly use the following command to try the tree-to-tree model:
The in.xml file contains the sentence:
38. When finishing it generates document “out.ttt” and update the document “translation-details.log”
39.
40. ============================================================
Build ZH->EN Tree to tree translation using Moses:
Prepare corpus:
The corpus “Oxford-dictionary” is extracted from Oxford Chinese-English dictionary (7th version), and
segmented using NLPIR2013 segmentor (Zhang Huangping, CAS, accuracy 0.97).
Using the Oxford-dictionary.zh 12000 tokened simplified Chinese sentences, the GrammarTrained on
CTB-7, BerkeleyParser-1.7.jar, the parsing information: 10 minutes.
Using the TrainedGramEng-WSJ, Berkeley-Parser-1.7.jar, Oxford-dictionary.zh 12000 tokened English
sentences, the parsing: 11 minutes.
Firstly, we select the first 1200 sentences bilingual EN-ZH corpora for a trial. The parsed corpora as
below:
41. Convert the PENN parsed format into the Moses required tree format:
After the converting, the format of the corpus becomes:
Encoding the content into TUF-8 format, edit content into UNIX format:
42. Training language model:
Put the converted documents “Oxford-dic1200.parsed.mosesxml.zh” and “Oxford-
dic1200.parsed.mosesxml.en” into the VM directory: ~Aaron/corpus/training/
We first try to use the previously built language model “news-commentary-v8.fr-en.blm.en” from “news-
commentary-v8.fr-en.tok.en”, WMT13 training corpus.
Training translation model:
Put the converted documents “Oxford-dic1200.parsed.mosesxml.zh” and “Oxford-
dic1200.parsed.mosesxml.en” into the VM directory: ~Aaron/corpus/training/
Clear (empty) the directory ~Aaron/working/train/
Training command: (-f: source language; -e: target language)(without the reordering process in tree-to-
tree translation training)
cd ~/Aaron
mkdir working
cd working
43. ~/Aaron/Moses/mosesdecoder/scripts/training/train-model.perl -root-dir ./train -corpus
~/Aaron/corpus/training/Oxford-dic1200.parsed.mosesxml -f zh -e en -alignment grow-diag-
final-and -hierarchical -glue-grammar --source-syntax --target-syntax -lm
0:3:$HOME/Aaron/lm/news-commentary-v8.fr-en.blm.en:8 -external-bin-dir
~/Aaron/Moses/mosesdecoder/tools >& training.out.Oxford.parse.zh-en1 &
The training will be finished from 2013.11.26-17:48 to 2013.11.26-17:49. Below files will be generated:
44. Refer below command is from Tianliang:
“/home/ma96572/research/moses/scripts/training/train-model.perl -cores 5 --parallel -root-dir
/home/ma96572/Michelle/Syntax-based2/ -external-bin-dir /home/ma96572/research/giza-pp/bin
-corpus /home/ma96572/Michelle/Corpus/train5 -f en -e zh -alignment grow-diag-final-and -first-step 1
45. -last-step 9 -hierarchical -glue-grammar -lm 0:5:/home/ma96572/Michelle/LM/train5.blm.zh:0 >&
/home/ma96572/Michelle/trace/out3”
Testing:
We select the 1201th to 2400th Chinese sentences from the Oxford-dic120000.segmented EN-ZH
bilingual corpus for testing.
Input testing document:
Using the testing command:
The translation result:
46. Here, we change the testing format. Before the testing, we parse the input chinese sentences using the
traindGrammarCTB-7, the input testing document:
The testing command:
The testing translation result:
47. The translation result using the parsed input sentence is the same with previous result (without parsing
the input sentence).
The comparison of automatically translated sentences and references:
Preparing larger corpus-2
Using the Oxford-dictionary.zh 12000 tokened simplified Chinese sentences, the GrammarTrained on
CTB-7, BerkeleyParser-1.7.jar, the parsing information: 10 minutes.
Using the TrainedGramEng-WSJ, Berkeley-Parser-1.7.jar, Oxford-dictionary.zh 12000 tokened English
sentences, the parsing: 11 minutes.
10000 sentences (1st
-10000th) for training, 1000 sentences (10001th-11000th) for developing, 1000
(11001th-12000th) sentences for testing. We skip the developing stage this time.
48. Put the files “Oxford-dic10000.parsed.mosesxml.en” and “Oxford-dic10000.parsed.mosesxml.zh” in the
directory “~/Aaron/corpus/training/train10000Oxf”.
Training translation model-2:
cd ~/Aaron
mkdir working
cd working
~/Aaron/Moses/mosesdecoder/scripts/training/train-model.perl -root-dir train10000 -corpus
~/Aaron/corpus/training/train10000Oxf/Oxford-dic10000.parsed.mosesxml -f zh -e en
-alignment grow-diag-final-and -hierarchical -glue-grammar --source-syntax --target-syntax -lm
0:3:$HOME/Aaron/lm/news-commentary-v8.fr-en.blm.en:8 -external-bin-dir
~/Aaron/Moses/mosesdecoder/tools >& training.out.Oxford.parse.zh-en10000 &
It runs as below:
51. Using the testing command:
The translation result:
The comparison of automatical translation and reference sentences:
52. Calculate the testing score using BLEU:
Put the reference document:
Using the following command, we calculate the BLEU score of the 1000 translated sentences:
53. Preparing larger corpus-2-Uni-phrase-tags
Using the Oxford-dictionary.zh 12000 tokened simplified Chinese sentences, the GrammarTrained on
CTB-7, BerkeleyParser-1.7.jar, the parsing information: 10 minutes.
Using the TrainedGramEng-WSJ, Berkeley-Parser-1.7.jar, Oxford-dictionary.zh 12000 tokened English
sentences, the parsing: 11 minutes.
Replace the phrase tagset in parsed 12000 bilingual EN-ZH sentences using the universal phrase tagset.
10000 sentences (1st
-10000th) for training, 1000 sentences (10001th-11000th) for developing, 1000
(11001th-12000th) sentences for testing. We skip the developing stage this time.
Put the files “Oxford-dic10000.parsed.Uni.mosesxml.zh” and “Oxford-
dic10000.parsed.Uni.mosesxml.en” in the directory “~/Aaron/corpus/training/train10000Oxf”.
57. Calculate the testing score using BLEU:
Preparing larger corpus-3
Using the Oxford-dictionary.zh 120000 to-kened simplified Chinese sentences, the GrammarTrained on
CTB-7, BerkeleyParser-1.7.jar, the parsing information: 3h+12 minutes.
Using the TrainedGramEng-WSJ, Berkeley-Parser-1.7.jar, Oxford-dictionary.en 120000 tokened English
sentences, the parsing: 58 minutes.
100000 sentences (1st
-100000th) for training, 10000 sentences (100001th-110000th) for developing,
10000 (110001th-120000th) sentences for testing. We skip the developing stage this time.
Put the files “Oxford-dic100000.parsed.mosesxml.en” and “Oxford-dic100000.parsed.mosesxml.zh” in
the VM directory “~/Aaron/corpus/training/train100000Oxf”.
58. Training translation model-3
Using the following command the training began at 2013.12.01-19:12:04 and finished at
Exit with the error report:
So, we should first do the “cleaning of the corpus” task this time to delete too long sentences and empty
sentences, etc. due to the larger corpus.
59. After checking, we find the problem:
The original segmented 31174th
sentence pair have no problem:
31174th
– EN: How old are you ?
31174th
– CN: 你 多 大 了 ?
After the parsing there is problem:
31174th
– EN: “empty”
31174th
– CN: <tree label="TOP"> <tree label="CP"> <tree label="IP"> <tree label="NP"> <tree
label="PN"> 你 </tree> </tree> <tree label="VP"> <tree label="ADVP"> <tree label="AD"> 多 </tree>
</tree> <tree label="VP"> <tree label="VA"> 大 </tree> </tree> </tree> </tree> <tree label="SP"> 了
</tree> <tree label="PU"> ? </tree> </tree> </tree>
The 31173rd
and 31175th
parsed sentence pairs have no problems.
Cleaning (to remove the mis-aligned sentencs, long sentences and empty sentences, which
may cause problems with the training pipeline)
Type the following command to delete the sentences whose length is larger than 80 (too long) or
less than 1 (empty):
The generated cleaned files:
60. Using the following command the training once more began at 2013.12.02-10:28:49 and finished at
10:33:00.
Within several minutes, training finish as:
64. Calculate the testing score using BLEU:
Tuning using 100001st
-110000th sentences-3
Prepare the tuning document:
Clean the bilingual tuning files:
65. 6388 sentences left among the 10,000 bilingual sentences.
The original parameters in moses.ini file before tuning:
66. If use the following command for tuning:
~/Aaron/Moses/mosesdecoder/scripts/training/mert-moses.pl ~/Aaron/corpus/tune/Oxford-
dic100001-11000.parsed.mosesxml.clean.zh ~/Aaron/corpus/tune/Oxford-dic100001-
11000.parsed.mosesxml.clean.en ~/Aaron/Moses/mosesdecoder/bin/moses_chart
train100000T/model/moses.ini --mertdir ~/Aaron/Moses/mosesdecoder/bin/ &> tune110001-
110000mert.out &
As shown above, the tuning exits unsuccessfully. However, the “tune110001-110000mert.out”
generated:
67. The record shows “Aborted (core dumped), Exit”, which means this exit is due to the un-enough memory
of the computer. So let’s move it into the nlp2ct-186-server.
Tuning on nlp2ct-186-sever
The moses system has already installed on the sever as below directory with the root /smt:
68. Using the following command to try 186-sever tuning:
Without right mouse click for refresh, the generated file will not show in the 186-sever-directory.
If using the following command for tuning:
It exits with the error report in the generated record file:
If using the following command to try tuning:
69. It generate the record file with error report:
Try the following command for tuning:
It also exits as bellow. And there is no record file generated:
Try to use the clean corpus for tuning:
First, clean the plain corpus:
70. Using the following command to tune:
As shown above picture, the tuning also exits. Not successful. However, it generated the record file
“tune110001-110000.plain.mert.out”:
71. This shows the exit reason “Aborted (core dumped)”, un-enough memory.
Preparing larger corpus-3-uni-phrse-tags
Put the prepared Uni-training documents:
76. Calculate the testing score using BLEU:
The testing result using original phrase tagset is BLEU=10.44, which means there is almost no difference.
Preparing larger corpus-4-186sever
Using the Oxford-120000 total sentences for training. The parsing use WSJ-trained-en and CTB-7-trained-
cn, cleaning,
Clean the document:
It shows that 68971 sentences are left after cleaning among the 120000 sentences.
Training translation model-4-186sever
77. Using the following command for the training translation model:
The training finished as :
Using SCRIPTS_ROOTDIR: /smt/mosesdecoder/scripts
Using single-thread GIZA
(1) preparing corpus @ Fri Dec 6 12:19:27 CST 2013
…
78. (9) create moses.ini @ Fri Dec 6 12:28:49 CST 2013
Training generates:
Testing-4-186sever:
Firstly, we used the NIST-MT03 testing CN-.EN data
The testing command:
Testing once more using the parsed (use the grammar trained on CTB7) and converted mosesxml format:
79. Secondly, we used the NIST-MT04 CN-EN test data:
Once more, parse the sentence, and then testing:
80. The warning is due to that the 1267th
sentence is too long to parse successfully. The parsed document
shows that the 1267th
sentence is lost, however the previous and following sentences are normal:
81. The testing command and run:
Thirdly, test the NIST-MT05 testing data:
It runs as below, the reading of tule-table.gz, etc.:
87. Uni120000-Training time from “preparing corpus @ Sun Dec 8 12:42:38 CST 2013” to “create moses.ini
@ Sun Dec 8 12:51:57 CST 2013”—total: 9mins+19s
Compare-120000-training time from “(1) preparing corpus @ Fri Dec 6 12:19:27 CST 2013” to “(9) create
moses.ini @ Fri Dec 6 12:28:49 CST 2013”—total: 9mins+22s
Testing-4-uni-186sever:
Use the following command for testing the NIST-MT03 testing CN-.EN data
Testing runs as:
88. The testing translation result is totally the same with the result using the original phrase tags trained
model. Why? Is that due to the testing input is plain sentences?
Parse the input sentences, and have a check of the re-testing result. Use the following command to parse
the NIST-MT03 testing sentences:
89. Replace the parsed phrase tags into uni-phrase tags and Convert the prased format into moses.xml
format:
90. Run the translation testing again:
It runs as:
The translation result is different with the translation that uses the plain input text.
91. Secondly, we used the NIST-MT04 CN-EN test data:
Testing once more using the parsed corpus:
It finished as:
98. Evaluation:
Using the following command, we calculate the BLEU score of the 1000 translated sentences:
Export result and evaluate using Asiya-tool?
99. Build CN-EN tree-to-string translation using moses-Uni:
Training translation corpus: source-parsed, target-plain
Training:
Testing:
100. Tree-to-string: Using the ori-phrase and uni-phrase, the evaluation scores using Asiya-tool are different.
Build CN-EN string-to-tree translation using moses-ori:
Training translation Corpus: source-plain, target-parsed.
104. String-to-tree: Using the ori-phrase and uni-phrase, the evaluation scores using Asiya-tool are the same,
why?
105. Build PT->CN tree-to-tree translation model with ori-phrase tags on 186-
server:
Prepare corpus:
Train language model:
Train language model of CN uses the 120,000 Oxford simplified CN sentences.
Use the following command to check the moses installation on the server:
107. Use the following command to add start and end symbol “<s> </s>”:
Use the following command for the generation of language model:
The generated language model:
108. Use the following command to compile the language model, generate the “”:
The content of the zh.arpa file:
109.
110. To make the faster loading, use the command to binary the zh.arpa file:
If use the following command, it will show the following result:
111. Corpus for Training translation model:
Use the corpus 200,000 PT-CN bilingual sentences extracted from online websites of Macau SAR.
Prepare PT corpus:
Parse the PT.200000.tok sentence using the trained grammar on all the Floresta-Bosque corpus (train-
deve-test):
Train the grammar:
This time, the 00.mrg contains “train+deve+test” sentences, 01.mrg contains deve sentences, 02.mrg
contains testing sentences.
113. Put the corpus and the grammar in the 186-server for parsing:
The parsing command, the parsing on server-186 began at 20131213-4:17 PM, finished at 20131215-
03:48:36AM
115. For the uni-nofuntag-Floresta-Bosque seting: We should replace the ori-phrase tags parsed from last step
with the uni-phrase. (If we use the uni-phrase-grammar-trained to parse the plain.tok PT text to gain the
uni-phrase taggest corpus, it is not suitable because the grammar-trained-pt-floresta and the grammar-
trained-pt-floresta-uniphrase have different accuracies.)
Prepare the CN corpus:
We parse the 200,000 chinese.tok sentences using the GrammarTrainedCTB-7; parsing began at
20131213-10:47AM, finished at 20131214-04:18 AM;
The training finished as:
116. After the parsing finish of the CN corpus, we replace the ori-phrase-tags using the uni-nofuntag-phrase-
tags
Training translation model use ori-tags:
Convert the 200,000 PT and CN parsed sentences into mosesxml format.
Test translation model sue ori-tags:
Training translation model use uni-tags:
Convert the 200,000 PT and CN parsed sentences into mosesxml format.
Test translation model sue uni-tags:
Tune the MT system using LEPOR metric (external metric):
1. Change the xxxx file as below to call the LEPOR metric.
2. Change the LEPOR source document as below:
117. 3. Put the source document of LEPOR metric at yyy
4. Run the system like below to test
5.
============================================================
Reference:
Moses manual: [http://www.statmt.org/moses/manual/manual.pdf], accessed 2013.10.31
TianLiang’ blog: [http://www.tianliang123.com/moses_installation], accessed 2013.10.31.