SlideShare a Scribd company logo
1 of 20
Download to read offline
집에서 다시 만든 머신러닝 기반 자동번역기
#DeepLearning
2019.8.24
이홍주 (lee.hongjoo@yandex.com)
KOREANizerencore
:
NMT based Ro-Ko Transliterator
2019.8.24
이홍주 (lee.hongjoo@yandex.com)
Introduction Previously on PyCon KR 2019
https://www.pycon.kr/program/talk-detail?id=117
Introduction
● Transfer based translation
Previously on PyCon KR 2019
Bernard Vauquois' pyramid
target
text
source
text
syntax
phrases
words
syntax
phrases
words
Introduction
● SMT based Ro-Ko Transliteration
Previously on PyCon KR 2019
● Romanized K-pop Lyrics
○ 12,095 songs
○ 1,586,305 lines
○ 121,469 unique bi-word pairs
■ ex. “모르는 moreuneun”
Introduction
● Interlingual Translation
○ Two phases
■ Analysis : Analyze the source language
into a semantic representation
■ Generation : Convert the
representation into an target language
Previously on PyCon KR 2019
Bernard Vauquois' pyramid
target
text
source
text
Interlingua
analysis
generation
Outline
● Introduction
● Neural Machine Translation
○ Drawbacks in SMT
○ Neural Language Model
○ Encoder-Decoder architecture
○ Attention Model
○ Ro-Ko Transliterator
● Dynamic Programming
○ Definition
○ Code examples
Neural Machine Translation
● Phrase based translation
○ Translation task breaks up source sentences into multiple chunks
○ and then translates them phrase-by-phrase
● Local translation problem
○ can’t capture long-range dependencies in languages
■ e.g., gender agreements, syntax structures
○ this led to disfluency in translation outputs
Drawbacks in SMT
Neural Machine Translation
● Standard Network for a text sequence
○ Input, outputs can be different lengths in different examples
○ Doesn’t share features learned across different positions of text
Neural Language Model
quoted from Andrew Ng’s Coursera lecture
Neural Machine Translation
● RNN Language Model
○ P(w1
w2
w3
... wt
) = P(w1
) x P(w2
|w1
) x P(w3
|w1
w2
) x …… x P(wt
|w1
w2
...wt-1
)
○ Each step in RNN outputs distribution over the next word given preceding words
○ P(<s>Cats average 15 hours of sleep a day</s>)
Neural Language Model
a0
a1
<s>
P(cats|<s>)
a2
cats
P(average|cats)
a1
average
P(15|cats average)
a1
day
P(</s>|......)
……
● Conditional Language Model
○ P(y1
y2
… yT
| x1
x2
… xT
)
Language Model :
Machine Translation :
Neural Machine Translation Neural Language Model
quoted from Andrew Ng’s Coursera lecture
NMT
● Encoder
○ reads the source sentence to build a “thought” vector
○ the vector presents the sentence meaning
● Decoder
○ processes the “thought” vector to emit a translation
Encoder-Decoder architecture
quoted from Google’s Tensorflow tutorial
NMT seq2seq model
quoted from Andrew Ng’s Coursera lecture
NMT
● Problem of long sequences
○ works well with short sentences
○ performance drops on long sentences
Attention Model
quoted from Andrew Ng’s Coursera lecture
Ro-Ko Transliteration
● http://enc-koreanizer.herokuapp.com
Enc-Koreanizer
Dynamic Programming
● To grown-ups
○ In Mathematical Optimization and
Computation Programming Method
○ Simplifying a problem by breaking it
down into simpler sub-problems in a
recursive manner.
○ Applicable under two conditions
■ optimal sub-structure
■ overlapping sub-problems
Definition
Dynamic Programming
● Fibonacci Numbers
○ F0
= 0, F1
= 1, and Fn
= Fn-1
+ Fn-2
for n > 1
○ 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, …
● Approaches
○ by Recursion (Naive approach)
○ by Memoization (Top-down)
○ by Tabulation (Buttom-up)
Code Examples
Dynamic Programming
● Word Segmentation
○ “whatdoesthisreferto” ⇒ “what does this refer to”
● Best segmentation Ps
○ one with highest probability
● Probability of a segmentation
○ Pw
(first word) x Ps
(rest of segmentation)
● Pw
(word)
○ estimated by counting (unigram)
● Ps
(“choosespain”)
○ Pw
(“choose”) x Pw
(“spain”) > Pw
(“chooses”) x Pw
(“pain”)
Code Examples
Dynamic Programming
● Segmentation problem Ps
(“whatdoesthisreferto”)
→ P(“w”) x Ps
(“hatdoesthisreferto”)
→ P(“wh”) x Ps
(“atdoesthisreferto”)
→ P(“wha”) x Ps
(“tdoesthisreferto”)
→ P(“what”) x Ps
(“doesthisreferto”)
→ ……
Code Examples
Contacts
lee.hongjoo@yandex.com
https://www.linkedin.com/in/hongjoo-lee/
https://github.com/midnightradio/consalad-5th.git

More Related Content

Similar to Enc-Koreanizer : NMT based Ro-Ko Transliterator

JSX - developing a statically-typed programming language for the Web
JSX - developing a statically-typed programming language for the WebJSX - developing a statically-typed programming language for the Web
JSX - developing a statically-typed programming language for the Web
Kazuho Oku
 
A hierarchical neural autoencoder for paragraphs and documents
A hierarchical neural autoencoder for paragraphs and documentsA hierarchical neural autoencoder for paragraphs and documents
A hierarchical neural autoencoder for paragraphs and documents
Hayahide Yamagishi
 
Babar: Knowledge Recognition, Extraction and Representation
Babar: Knowledge Recognition, Extraction and RepresentationBabar: Knowledge Recognition, Extraction and Representation
Babar: Knowledge Recognition, Extraction and Representation
Pierre de Lacaze
 
High Performance Rust UI.pdf
High Performance Rust UI.pdfHigh Performance Rust UI.pdf
High Performance Rust UI.pdf
mraaaaa
 

Similar to Enc-Koreanizer : NMT based Ro-Ko Transliterator (20)

Nugo final presentation
Nugo final presentationNugo final presentation
Nugo final presentation
 
Advanced Neural Machine Translation (D4L2 Deep Learning for Speech and Langua...
Advanced Neural Machine Translation (D4L2 Deep Learning for Speech and Langua...Advanced Neural Machine Translation (D4L2 Deep Learning for Speech and Langua...
Advanced Neural Machine Translation (D4L2 Deep Learning for Speech and Langua...
 
SANGEETA_YADAV_AI_VIDEO_SUMMARIZER_WEB_APP.pptx
SANGEETA_YADAV_AI_VIDEO_SUMMARIZER_WEB_APP.pptxSANGEETA_YADAV_AI_VIDEO_SUMMARIZER_WEB_APP.pptx
SANGEETA_YADAV_AI_VIDEO_SUMMARIZER_WEB_APP.pptx
 
JSX - developing a statically-typed programming language for the Web
JSX - developing a statically-typed programming language for the WebJSX - developing a statically-typed programming language for the Web
JSX - developing a statically-typed programming language for the Web
 
Do you think OOP when writing topics?
Do you think OOP when writing topics?Do you think OOP when writing topics?
Do you think OOP when writing topics?
 
Neural Machine Translation (D3L4 Deep Learning for Speech and Language UPC 2017)
Neural Machine Translation (D3L4 Deep Learning for Speech and Language UPC 2017)Neural Machine Translation (D3L4 Deep Learning for Speech and Language UPC 2017)
Neural Machine Translation (D3L4 Deep Learning for Speech and Language UPC 2017)
 
C Programming - Refresher - Part I
C Programming - Refresher - Part I C Programming - Refresher - Part I
C Programming - Refresher - Part I
 
A hierarchical neural autoencoder for paragraphs and documents
A hierarchical neural autoencoder for paragraphs and documentsA hierarchical neural autoencoder for paragraphs and documents
A hierarchical neural autoencoder for paragraphs and documents
 
@IndeedEng: Tokens and Millicents - technical challenges in launching Indeed...
@IndeedEng:  Tokens and Millicents - technical challenges in launching Indeed...@IndeedEng:  Tokens and Millicents - technical challenges in launching Indeed...
@IndeedEng: Tokens and Millicents - technical challenges in launching Indeed...
 
Lecture 1 Compiler design , computation
Lecture 1 Compiler design , computation Lecture 1 Compiler design , computation
Lecture 1 Compiler design , computation
 
Master's Thesis Alessandro Calmanovici
Master's Thesis Alessandro CalmanoviciMaster's Thesis Alessandro Calmanovici
Master's Thesis Alessandro Calmanovici
 
[EMNLP2017読み会] Efficient Attention using a Fixed-Size Memory Representation
[EMNLP2017読み会] Efficient Attention using a Fixed-Size Memory Representation[EMNLP2017読み会] Efficient Attention using a Fixed-Size Memory Representation
[EMNLP2017読み会] Efficient Attention using a Fixed-Size Memory Representation
 
Translating Qt Applications
Translating Qt ApplicationsTranslating Qt Applications
Translating Qt Applications
 
Babar: Knowledge Recognition, Extraction and Representation
Babar: Knowledge Recognition, Extraction and RepresentationBabar: Knowledge Recognition, Extraction and Representation
Babar: Knowledge Recognition, Extraction and Representation
 
Deep Learning for Chatbot (3/4)
Deep Learning for Chatbot (3/4)Deep Learning for Chatbot (3/4)
Deep Learning for Chatbot (3/4)
 
Deep Natural Language Processing for Search and Recommender Systems
Deep Natural Language Processing for Search and Recommender SystemsDeep Natural Language Processing for Search and Recommender Systems
Deep Natural Language Processing for Search and Recommender Systems
 
Typing Concerns
Typing ConcernsTyping Concerns
Typing Concerns
 
Natural Question Generation using Deep Learning
Natural Question Generation using Deep LearningNatural Question Generation using Deep Learning
Natural Question Generation using Deep Learning
 
High Performance Rust UI.pdf
High Performance Rust UI.pdfHigh Performance Rust UI.pdf
High Performance Rust UI.pdf
 
[246]QANet: Towards Efficient and Human-Level Reading Comprehension on SQuAD
[246]QANet: Towards Efficient and Human-Level Reading Comprehension on SQuAD[246]QANet: Towards Efficient and Human-Level Reading Comprehension on SQuAD
[246]QANet: Towards Efficient and Human-Level Reading Comprehension on SQuAD
 

Recently uploaded

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 

Recently uploaded (20)

ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 

Enc-Koreanizer : NMT based Ro-Ko Transliterator

  • 1. 집에서 다시 만든 머신러닝 기반 자동번역기 #DeepLearning 2019.8.24 이홍주 (lee.hongjoo@yandex.com)
  • 2. KOREANizerencore : NMT based Ro-Ko Transliterator 2019.8.24 이홍주 (lee.hongjoo@yandex.com)
  • 3. Introduction Previously on PyCon KR 2019 https://www.pycon.kr/program/talk-detail?id=117
  • 4. Introduction ● Transfer based translation Previously on PyCon KR 2019 Bernard Vauquois' pyramid target text source text syntax phrases words syntax phrases words
  • 5. Introduction ● SMT based Ro-Ko Transliteration Previously on PyCon KR 2019 ● Romanized K-pop Lyrics ○ 12,095 songs ○ 1,586,305 lines ○ 121,469 unique bi-word pairs ■ ex. “모르는 moreuneun”
  • 6. Introduction ● Interlingual Translation ○ Two phases ■ Analysis : Analyze the source language into a semantic representation ■ Generation : Convert the representation into an target language Previously on PyCon KR 2019 Bernard Vauquois' pyramid target text source text Interlingua analysis generation
  • 7. Outline ● Introduction ● Neural Machine Translation ○ Drawbacks in SMT ○ Neural Language Model ○ Encoder-Decoder architecture ○ Attention Model ○ Ro-Ko Transliterator ● Dynamic Programming ○ Definition ○ Code examples
  • 8. Neural Machine Translation ● Phrase based translation ○ Translation task breaks up source sentences into multiple chunks ○ and then translates them phrase-by-phrase ● Local translation problem ○ can’t capture long-range dependencies in languages ■ e.g., gender agreements, syntax structures ○ this led to disfluency in translation outputs Drawbacks in SMT
  • 9. Neural Machine Translation ● Standard Network for a text sequence ○ Input, outputs can be different lengths in different examples ○ Doesn’t share features learned across different positions of text Neural Language Model quoted from Andrew Ng’s Coursera lecture
  • 10. Neural Machine Translation ● RNN Language Model ○ P(w1 w2 w3 ... wt ) = P(w1 ) x P(w2 |w1 ) x P(w3 |w1 w2 ) x …… x P(wt |w1 w2 ...wt-1 ) ○ Each step in RNN outputs distribution over the next word given preceding words ○ P(<s>Cats average 15 hours of sleep a day</s>) Neural Language Model a0 a1 <s> P(cats|<s>) a2 cats P(average|cats) a1 average P(15|cats average) a1 day P(</s>|......) ……
  • 11. ● Conditional Language Model ○ P(y1 y2 … yT | x1 x2 … xT ) Language Model : Machine Translation : Neural Machine Translation Neural Language Model quoted from Andrew Ng’s Coursera lecture
  • 12. NMT ● Encoder ○ reads the source sentence to build a “thought” vector ○ the vector presents the sentence meaning ● Decoder ○ processes the “thought” vector to emit a translation Encoder-Decoder architecture quoted from Google’s Tensorflow tutorial
  • 13. NMT seq2seq model quoted from Andrew Ng’s Coursera lecture
  • 14. NMT ● Problem of long sequences ○ works well with short sentences ○ performance drops on long sentences Attention Model quoted from Andrew Ng’s Coursera lecture
  • 16. Dynamic Programming ● To grown-ups ○ In Mathematical Optimization and Computation Programming Method ○ Simplifying a problem by breaking it down into simpler sub-problems in a recursive manner. ○ Applicable under two conditions ■ optimal sub-structure ■ overlapping sub-problems Definition
  • 17. Dynamic Programming ● Fibonacci Numbers ○ F0 = 0, F1 = 1, and Fn = Fn-1 + Fn-2 for n > 1 ○ 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, … ● Approaches ○ by Recursion (Naive approach) ○ by Memoization (Top-down) ○ by Tabulation (Buttom-up) Code Examples
  • 18. Dynamic Programming ● Word Segmentation ○ “whatdoesthisreferto” ⇒ “what does this refer to” ● Best segmentation Ps ○ one with highest probability ● Probability of a segmentation ○ Pw (first word) x Ps (rest of segmentation) ● Pw (word) ○ estimated by counting (unigram) ● Ps (“choosespain”) ○ Pw (“choose”) x Pw (“spain”) > Pw (“chooses”) x Pw (“pain”) Code Examples
  • 19. Dynamic Programming ● Segmentation problem Ps (“whatdoesthisreferto”) → P(“w”) x Ps (“hatdoesthisreferto”) → P(“wh”) x Ps (“atdoesthisreferto”) → P(“wha”) x Ps (“tdoesthisreferto”) → P(“what”) x Ps (“doesthisreferto”) → …… Code Examples