Statistical Machine Translation

Slides:



Advertisements
Similar presentations
Machine Learning Approaches to the Analysis of Large Corpora : A Survey Xunlei Rose Hu and Eric Atwell University of Leeds.
Advertisements

Statistical Machine Translation Part II: Word Alignments and EM Alexander Fraser Institute for Natural Language Processing University of Stuttgart
Statistical Machine Translation Part II: Word Alignments and EM Alexander Fraser ICL, U. Heidelberg CIS, LMU München Statistical Machine Translation.
Statistical Machine Translation Part II – Word Alignments and EM Alex Fraser Institute for Natural Language Processing University of Stuttgart
1 Statistical NLP: Lecture 13 Statistical Alignment and Machine Translation.
Abstraction IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 17, 2013 Carolyn Seaman University of Maryland, Baltimore County.
Statistical Machine Translation Part III – Phrase-based SMT / Decoding Alex Fraser Institute for Natural Language Processing University of Stuttgart
English-Persian SMT Reza Saeedi 1 WTLAB Wednesday, May 25, 2011.
Living with spreadsheets Dean Buckner Financial Services Authority JULY 2011.
Week 9: resources for globalisation Finish spell checkers Machine Translation (MT) The ‘decoding’ paradigm Ambiguity Translation models Interlingua and.
CSE 143 Lecture 11 Maps Grammars slides created by Alyssa Harding
Statistical Machine Translation Part III – Phrase-based SMT / Decoding Alexander Fraser Institute for Natural Language Processing Universität Stuttgart.
1 Introduction to Natural Language Processing ( ) Language Modeling (and the Noisy Channel) AI-lab
1 Running Experiments for Your Term Projects Dana S. Nau CMSC 722, AI Planning University of Maryland Lecture slides for Automated Planning: Theory and.
Statistical Machine Translation Part II: Word Alignments and EM Alex Fraser Institute for Natural Language Processing University of Stuttgart
A Simple English-to-Punjabi Translation System By : Shailendra Singh.
Introduction to Machine Translation
INTRODUCTION TO COMPUTER PROGRAMMING ITC-314. Computer Programming  Computer Programming means creating a sequence of instructions to enable a computer.
LB160 (Professional Communication Skills For Business Studies)
Fabien Cromieres Chenhui Chu Toshiaki Nakazawa Sadao Kurohashi
Neural Machine Translation
Statistical Machine Translation Part II: Word Alignments and EM
Advanced Computer Systems
Recommendation in Scholarly Big Data
Teacher Reference (Please use electronic version with class)
RECENT TRENDS IN SMT By M.Balamurugan, Phd Research Scholar,
Programming what is C++
Whatcha doin'? Aims: To start using Python. To understand loops.
Intensive Course for English Teachers
Approaches to Machine Translation
MATHEMATICS EDUCATION DEPARTMENT
Introduction to Machine Translation
Python Let’s get started!.
This PowerPoint can be found on my Moodle page.
Alexander Fraser CIS, LMU München Machine Translation
UNIT 3 – LESSON 5 Creating Functions.
Summarising skills and professional standards
The Need for Algorithms 2 days
teachers to our class today
Unit 8 Learning a foreign language.
Statistical NLP: Lecture 13
Algorithm and Ambiguity
CS 240 – Lecture 11 Pseudocode.
Neural Lattice Search for Domain Adaptation in Machine Translation
Lesson #4: Short Writing Tasks
Neural Machine Translation By Learning to Jointly Align and Translate
Statistical Machine Translation Part III – Phrase-based SMT / Decoding
Compiler Construction
Teacher Reference (Please use electronic version with class)
CSCI 5832 Natural Language Processing
Mrs. Atkinson 6th grade Math, Science & Geography
UMBC CMSC 104 – Section 01, Fall 2016
Approaches to Machine Translation
Thinking About How You Read
Programming.
Algorithm and Ambiguity
Introduction to Machine Translation
Your Handy Dandy Guide to Organizing a Proper 5 Paragraph Essay
Statistical Machine Translation Part IIIb – Phrase-based Model
Machine Translation(MT)
Writing a Free Response Essay
Living with spreadsheets
Teacher Reference (Please use electronic version with class)
Johns Hopkins 2003 Summer Workshop on Syntax and Statistical Machine Translation Chapters 5-8 Ethan Phelps-Goodman.
Professor: Shereen Khoja
Statistical Machine Translation Part VI – Phrase-based Decoding
CMPT 120 Lecture 2 - Introduction to Computing Science – Problem Solving, Algorithm and Programming.
Neural Machine Translation
Neural Machine Translation by Jointly Learning to Align and Translate
CS249: Neural Language Model
Presentation transcript:

Statistical Machine Translation Assignment 2: Statistical Machine Translation My name is Charlie Marking first two parts of A2 You may have other assignments due or midterms this week Cover all materials and try to finish today’s TUT earlier I will take questions after the TUT I will ask the professor to post those slides on the website after the TUT CSC401/2511 Tutorial, Winter 2019 Charlie Chenyu Zhang Based on slides by Mohamed Abdalla, Patricia Thaine, Jackie Cheung, Alex Fraser and Frank Rudzicz

} Today’s Schedule History of Machine Translation A2: the big picture Task 1: Preprocess Inputs Task 2: Compute n-gram counts Marking: How each tasks are evaluated } Focus Before we dive in, let's take a look of today's schedule History of MT won’t be on the test We will focus on Task 1 and Task 2 today

Today’s Schedule History of Machine Translation A2: the big picture Task 1: Preprocess Inputs Task 2: Compute n-gram counts Marking: How each tasks are evaluated Without further ado, let's get started with the History

Rough History of Machine Translation Research 1940 1950 1960 1970 1980 1990 2000 2010 2020 When I look at an article in Russian, I say: "This is really written in English, but has been coded in some strange symbols. I will now proceed to decode." [Warren Weaver, 1947] The early years of MT The first ideas of statistical machine translation were introduced by Warren Weaver in 1949 These proposals were based on information theory. They were very successful in code breaking during the Second World War Cromieres, Fabien, Toshiaki Nakazawa, and Raj Dabre. "Neural Machine Translation: Basics, Practical Aspects and Recent Trends." Proceedings of the IJCNLP 2017

Rough History of Machine Translation Research 1940 1950 1960 1970 1980 1990 2000 2010 2020 It turns out MT is difficult Beginning of MT In A2, IBM-1 to learn the alignment between English and French words automatically. However, early systems used large bilingual dictionaries and hand-coded rules for fixing the word order in the final output which was eventually considered too restrictive in linguistic developments at the time. We realized that MT is hard because of semantic ambiguity. At the time, this type of semantic ambiguity could only be solved by writing source texts for machine translation in a controlled language that uses a vocabulary in which each word has exactly one meaning. Cromieres, Fabien, Toshiaki Nakazawa, and Raj Dabre. "Neural Machine Translation: Basics, Practical Aspects and Recent Trends." Proceedings of the IJCNLP 2017

Rough History of Machine Translation Research 1940 1950 1960 1970 1980 1990 2000 2010 2020 It turns out MT is difficult Disinterest in MT research (esp. in USA after ALPAC report) Beginning of MT ALPAC, the Automatic Language Processing Advisory Committee After this ALPAC report, research in the US was almost completely abandoned for over a decade. In Canada, however, research continued. Cromieres, Fabien, Toshiaki Nakazawa, and Raj Dabre. "Neural Machine Translation: Basics, Practical Aspects and Recent Trends." Proceedings of the IJCNLP 2017

Rough History of Machine Translation Research 1940 1950 1960 1970 1980 1990 2000 2010 2020 Diversity and the number of installed systems for MT had increased It turns out MT is difficult Disinterest in MT research (esp. in USA after ALPAC report) Beginning of MT Between 1980s and early 1990s, as a result of the improved availability of microcomputers, there was a large surge in a number of novel methods for machine translation. Cromieres, Fabien, Toshiaki Nakazawa, and Raj Dabre. "Neural Machine Translation: Basics, Practical Aspects and Recent Trends." Proceedings of the IJCNLP 2017

Rough History of Machine Translation Research 1940 1950 1960 1970 1980 1990 2000 2010 2020 Example-based Machine Translation (EBMT) [Nagao, 1981] In 1981, Makoto Nagao and his group used methods based on large numbers of translation examples, a technique that is now termed example-based machine translation Cromieres, Fabien, Toshiaki Nakazawa, and Raj Dabre. "Neural Machine Translation: Basics, Practical Aspects and Recent Trends." Proceedings of the IJCNLP 2017

Rough History of Machine Translation Research 1940 1950 1960 1970 1980 1990 2000 2010 2020 Example-based Machine Translation (EBMT) [Nagao, 1981] Statistical Machine Translation (SMT) [Brown et al., 1993] IBM Model 1 that we will use in A2 was introduced by Brown et al. in 1993 Cromieres, Fabien, Toshiaki Nakazawa, and Raj Dabre. "Neural Machine Translation: Basics, Practical Aspects and Recent Trends." Proceedings of the IJCNLP 2017

Rough History of Machine Translation Research 1940 1950 1960 1970 1980 1990 2000 2010 2020 Phrase-based SMT [Koehn et al., 2003] Example-based Machine Translation (EBMT) [Nagao, 1981] Statistical Machine Translation (SMT) [Brown et al., 1993] The statistical translation models were initially word based (Models 1-6 from IBM Hidden Markov model), but significant advances were made with the introduction of phrase based models in 2003. Cromieres, Fabien, Toshiaki Nakazawa, and Raj Dabre. "Neural Machine Translation: Basics, Practical Aspects and Recent Trends." Proceedings of the IJCNLP 2017

Rough History of Machine Translation Research 1940 1950 1960 1970 1980 1990 2000 2010 2020 Phrase-based SMT [Koehn et al., 2003] Neural Machine Translation (NMT) [Sutskever et al., 2014] Example-based Machine Translation (EBMT) [Nagao, 1981] Statistical Machine Translation (SMT) [Brown et al., 1993] If you are interested in the Neural Network, the first scientific paper on using neural networks in machine translation appeared in 2014. Neural machine translation (NMT) is an approach to machine translation that uses a large artificial neural network to predict the likelihood of a sequence of words, typically modeling entire sentences in a single integrated model. Cromieres, Fabien, Toshiaki Nakazawa, and Raj Dabre. "Neural Machine Translation: Basics, Practical Aspects and Recent Trends." Proceedings of the IJCNLP 2017

Rough History of Machine Translation Research 1940 1950 1960 1970 1980 1990 2000 2010 2020 Phrase-based SMT [Koehn et al., 2003] Neural Machine Translation (NMT) [Sutskever et al., 2014] Example-based Machine Translation (EBMT) [Nagao, 1981] Statistical Machine Translation (SMT) [Brown et al., 1993] In A2, we will focus on the statistical machine translation Cromieres, Fabien, Toshiaki Nakazawa, and Raj Dabre. "Neural Machine Translation: Basics, Practical Aspects and Recent Trends." Proceedings of the IJCNLP 2017

Today’s Schedule History of Machine Translation A2: the big picture Task 1: Preprocess Inputs Task 2: Compute n-gram counts Marking: How each tasks are evaluated Now you know the brief history of the Machine Translation, let's take a look of the big picture of A2

A2 – The big picture Noisy Channel Model We need a language model, a translation model, and a decoder. Task 2. Language Model Task 4. You will implement IBM-1 as the translation model. P(A, F | E) where A is an alignment Task 5. Implement BLUE score to evaluate each translation your tasks!

Today’s Schedule History of Machine Translation A2: the big picture Task 1: Preprocess Inputs Task 2: Compute n-gram counts Marking: How each tasks are evaluated Now, let's talk about the most important part of today's TUT Task 1: preprocess inputs

Task 1. Preprocess input text [5 marks] Do not modify the header of the function Do only what is asked on the handout Submission should work on teach.cs Marking rubric You already know the first three points [read them] Regarding the marking rubric, we won’t test you on the corner cases. As long as your code passed all the examples in the handout, you should get the perfect mark for this task. Oh, I almost forget, there is one more thing

Task 1: One More Thing In addition to all the rules, you need to add “SENTSTART” and “SENTEND” tags for all English and French sentences For example: l’election.  => SENTSTART l’ election . SENTEND Also notice that the space between the sentence-final punctuation

Punctuation and Preprocessing Q: The preprocessing rules in the handout don't handle/mention this particular case. What do I do? Can I fix it? A: Yes, as long as it is reasonable and doesn’t interfere with anything which is explicitly specified in the handout. - No bonus marks for extra work on this part. - You are not required to do anything beyond what is described in the handout. - Do not spend too much time on this part!

Today’s Schedule History of Machine Translation A2: the big picture Task 1: Preprocess Inputs Task 2: Compute n-gram counts Marking: How each tasks are evaluated

Task 2: Compute n-gram counts Implement the function lm_train Train two models using lm_train, one for English and one for French. You can save the files with the names you want. Marking Rubric [read the first two points] Regarding the marking rubric, If you pass all the test cases, I will give you 15 marks. If you fail partial test cases or all test cases, I will look into your implementation and give you partial marks for the “general correctness of the code” So, I won't give you 0 on this part unless you did something crazy or you didn't implement the function at all Oh, there are two more things

Task 2: Two More Things Don’t change those lines This is what we expect language_model_uni = {string : int} # single dictionaries language_model_bigram = {string : dict(string : int)} # nested dictionaries language_model = {'uni': language_model_uni, "bi": language_model_bigram} We use pickle for Python object serialization

Today’s Schedule History of Machine Translation A2: the big picture Task 1: Preprocess Inputs Task 2: Compute n-gram counts Marking: How each tasks are evaluated

Marking (A large) Portion of it will be auto-marked. Your code will be tested individually (by file). Your code must adhere to the specifications for function calls to work. Do NOT hardcode any paths. It must work on CDF (test your code).

Marking (Cont) Initially: A B C D Correct Code: A B C D Your Code:

Marking (Cont) If we are testing “A”: Correct Code: Your Code: A B C D Feed the inputs to both files, then compare the result

Marking (Cont) If we are testing “B”: Correct Code: Your Code: A B C D

Today’s Schedule History of Machine Translation A2: the big picture Task 1: Preprocess Inputs Task 2: Compute n-gram counts Marking: How each tasks are evaluated Now, you have a basic understanding of the history of Machine Translation and understand the big picture of A2.

Enjoy your reading week! Thank you! Enjoy your reading week! That’s it everyone! Good luck with the midterms and other assignments.