SlideShare a Scribd company logo
형태소분석과 Vitebi 알고리즘
2015.02.15
윤도상
dsyoon@ncue.net
자연어 처리 (Natural Language Processing)
자연어 처리는
• 인간이 발화하는 언어 현상을 기계적으로 분석해서 컴퓨터가 이해할 수 있는 형태로 만드는 자연 언
어 이해 혹은 그러한 형태를 다시 인간이 이해할 수 있는 언어로 표현하는 제반 기술을 의미한다.
형태소 분석이란
• 어떤 대상 어절의 모든 가능한 분석 결과를 출력하는 것을 의미한다.
• 형태소 분석 단계에서 문제가 되는 부분은 미 등록어, 오탈자, 띄어쓰기 오류 등을 들 수 있다.
• 또 다른 문제로는 복합 명사 분해가 있을 수 있다.
 나는 → 나(대명사) + 는(조사)
 나는 → 날(동사) + 는(관형형어미)
품사 태거는
• 형태소 분석기가 출력한 다양한 분석 결과 중에서 문맥에 적합한 하나의 분석 결과를 선택하는 모
듈이라 할 수 있다.
• 분석 시 문맥 좌우에 위치한 중의성 해소의 힌트가 되는 정보를 이용해서 적합한 분석 결과를 선택
한다. 보통 대규모의 품사부착 말뭉치를 이용해서 구현하는데 은닉 마르코프 모델(HMM)이 널리
사용되고 있다.
 나는 오늘 학교에 갔다' → '나+는 오늘 학교+에 가다+았+다‘
 하늘을 나는 새를 보았다' → '하늘+을 날다+ㄴ 새+를 보다+았+다'
참고. 위키피디아
http://ko.wikipedia.org/wiki/%EC%9E%90%EC%97%B0_%EC%96%B8%EC%96%B4_%EC%B2%98%EB%A6%AC
하늘을
하늘(NNG)+을(JO)
나(NP)+는(JX)
날(VV)+는(ETM)
새(NNG)
새(MM)
나는 새
입력 문장: 하늘을 나는 새
하늘(NNG)+을(JO) 나(NP)+는(JX) 새(NNG)
하늘(NNG)+을(JO) 나(NP)+는(JX) 새(MM)
하늘(NNG)+을(JO) 날(VV)+는(ETM) 새(NNG)
하늘(NNG)+을(JO) 날(VV)+는(ETM) 새(MM)
형태소
분석
품사
태거
형태소 분석과 품사 태거 예
친구의 단순한 생활
- 친구의 일상을 관찰함 (V=산책, 쇼핑, 청소)
- 날씨 (S=해, 비)
[관찰 가능한 범위 에서 파악]
날씨 날씨에 따른 친구의 행동
친구가 “그끄저께 산책, 그저께 산책, 어제 청소, 오늘 쇼핑을 했다고 함”
이때 오늘까지 4일간 그곳의 날씨는?
<전이확률>
<발생확률>
<초기확률>
HMM 원리
확률 정보를 이용하여 ‘날씨’에 대한 Sequence를 예측할 수 있다.
(Vetebi 알고리즘 이용)
HMM 모델링
0.6 0.4
모델에 대한 State Diagram
문제 풀이
Vetebi 알고리즘을 이용
해 해 해 해
비 비 비 비
산책 산책 청소 쇼핑
0.4
0.6
0.6 0.6 0.6
0.7 0.7 0.7
0.3
0.4
0.3
0.4
0.3
0.4
0.4*0.6=0.24
0.6*0.1=0.06 0.24*0.4*0.1=0.0096
0.24*0.6*0.6=0.0864
0.06*0.3*0.6=0.0108
0.06*0.7*0.1=0.0042
0.0864*0.6*0.1=0.005184
0.0096*0.3*0.1=0.000288
0.0864*0.4*0.5=0.01728
0.0096*0.7*0.5=0.00336
0.005184*0.6*0.3=0.00093312
0.01728 *0.3*0.3=0.0015552
0.005184*0.4*0.4=0.00082944
0.01728 *0.7*0.4=0.0048384
정답 : 해, 해, 비, 비
계산 후 값이 높은 상태를 역추적한다.
그리고 높은 상태로 처음부터 선을 그으면 끝~

More Related Content

Featured

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
 

Featured (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

형태소분석과 HMM 알고리즘

  • 2. 자연어 처리 (Natural Language Processing) 자연어 처리는 • 인간이 발화하는 언어 현상을 기계적으로 분석해서 컴퓨터가 이해할 수 있는 형태로 만드는 자연 언 어 이해 혹은 그러한 형태를 다시 인간이 이해할 수 있는 언어로 표현하는 제반 기술을 의미한다. 형태소 분석이란 • 어떤 대상 어절의 모든 가능한 분석 결과를 출력하는 것을 의미한다. • 형태소 분석 단계에서 문제가 되는 부분은 미 등록어, 오탈자, 띄어쓰기 오류 등을 들 수 있다. • 또 다른 문제로는 복합 명사 분해가 있을 수 있다.  나는 → 나(대명사) + 는(조사)  나는 → 날(동사) + 는(관형형어미) 품사 태거는 • 형태소 분석기가 출력한 다양한 분석 결과 중에서 문맥에 적합한 하나의 분석 결과를 선택하는 모 듈이라 할 수 있다. • 분석 시 문맥 좌우에 위치한 중의성 해소의 힌트가 되는 정보를 이용해서 적합한 분석 결과를 선택 한다. 보통 대규모의 품사부착 말뭉치를 이용해서 구현하는데 은닉 마르코프 모델(HMM)이 널리 사용되고 있다.  나는 오늘 학교에 갔다' → '나+는 오늘 학교+에 가다+았+다‘  하늘을 나는 새를 보았다' → '하늘+을 날다+ㄴ 새+를 보다+았+다' 참고. 위키피디아 http://ko.wikipedia.org/wiki/%EC%9E%90%EC%97%B0_%EC%96%B8%EC%96%B4_%EC%B2%98%EB%A6%AC
  • 3. 하늘을 하늘(NNG)+을(JO) 나(NP)+는(JX) 날(VV)+는(ETM) 새(NNG) 새(MM) 나는 새 입력 문장: 하늘을 나는 새 하늘(NNG)+을(JO) 나(NP)+는(JX) 새(NNG) 하늘(NNG)+을(JO) 나(NP)+는(JX) 새(MM) 하늘(NNG)+을(JO) 날(VV)+는(ETM) 새(NNG) 하늘(NNG)+을(JO) 날(VV)+는(ETM) 새(MM) 형태소 분석 품사 태거 형태소 분석과 품사 태거 예
  • 4. 친구의 단순한 생활 - 친구의 일상을 관찰함 (V=산책, 쇼핑, 청소) - 날씨 (S=해, 비) [관찰 가능한 범위 에서 파악] 날씨 날씨에 따른 친구의 행동 친구가 “그끄저께 산책, 그저께 산책, 어제 청소, 오늘 쇼핑을 했다고 함” 이때 오늘까지 4일간 그곳의 날씨는? <전이확률> <발생확률> <초기확률> HMM 원리
  • 5. 확률 정보를 이용하여 ‘날씨’에 대한 Sequence를 예측할 수 있다. (Vetebi 알고리즘 이용) HMM 모델링 0.6 0.4 모델에 대한 State Diagram
  • 6. 문제 풀이 Vetebi 알고리즘을 이용 해 해 해 해 비 비 비 비 산책 산책 청소 쇼핑 0.4 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.3 0.4 0.3 0.4 0.3 0.4 0.4*0.6=0.24 0.6*0.1=0.06 0.24*0.4*0.1=0.0096 0.24*0.6*0.6=0.0864 0.06*0.3*0.6=0.0108 0.06*0.7*0.1=0.0042 0.0864*0.6*0.1=0.005184 0.0096*0.3*0.1=0.000288 0.0864*0.4*0.5=0.01728 0.0096*0.7*0.5=0.00336 0.005184*0.6*0.3=0.00093312 0.01728 *0.3*0.3=0.0015552 0.005184*0.4*0.4=0.00082944 0.01728 *0.7*0.4=0.0048384 정답 : 해, 해, 비, 비 계산 후 값이 높은 상태를 역추적한다. 그리고 높은 상태로 처음부터 선을 그으면 끝~