SlideShare una empresa de Scribd logo
1 de 18
Introduction to NLP
陳宇心 Yu-Hsin Chen
GDSC@TMU Lead 22'
Subtitle Goes Here
大家記得簽到
● 電腦到底是怎麼分類訊
息的呢?
在此之前......
大家一起夢回排列組合
Naive Bayes貝式分類器
在X條件下發生c的機率
大家一起夢回排列組合
Naive Bayes貝式分類器
一般郵件
● p(Dear|N)=0.47
● p(Friend|N)=0.29
● p(Lunch|N)=0.18
● p(Money|N)=0.06
假設收到一般郵件機率0.67
垃圾郵件機率
0.33
垃圾郵件
● p(Dear|S)=0.29
● p(Friend|S)=0.14
● p(Lunch|S)=0.00
● p(Money|S)=0.57
訊息:Dear Friend 是一般還
是垃圾郵件呢?
為一般郵件的可能性:
● p(N) x p(Dear|N) x p(Friend|N)=
0.67 x 0.47 x 0.29 = 0.091
為垃圾郵件的可能性:
● p(S) x p(Dear|S) x p(Friend|S)=
0.33 x 0.29 x 0.14 = 0.013
但是Dear Friend 和 Friend Dear的結
果相同,所以成為Naive
我們的詩到底更像更像誰的呢?
Naive Bayes 小實作
實作連結:
https://drive.google.com/file/d/1tDim_FOdjpl7d
TB2_LAZQ6azv2jxpLHg/view?usp=sharing
把句子處理成電腦也能懂的樣子
步驟:
什麼是Natural Language Processing?
1.Segmentation
2.Tokenization
3.Stop Words
4.Stemming
5.Lemmatization
6.Speech Tagging
斷句
Segmentation
記號化
Tokenization
"This is a sample"
“This” “is” “a” “Sample”
停用詞
Stop Words
有些字詞沒有重要意思
Ex. "a" "These" "is" "are"
提取-把後面的字元砍掉
Stemming Lemmatization
辭形還原
BUT
Caring—----> Car (失真)
Caring—----> Care
● 優點:將詞彙分成最小
有意義型態
● 缺點:貴
辭性標註
Speech Tagging
● 教電腦文法
專有名詞標註
步驟:
Named Entity Tagging
Project中重要的專有名詞 Ex.爬蟲爬影評 告訴電腦明星的名字
Tokenization,Stemming
,Lemmintization
小實作
實作連結:
https://colab.research.google.com/drive/1Qf6-
GrM1PNCkkIY4DsXOpZsb1DwYYUie?usp=sharin
g
實作:判斷tweet是否
與災難相關
中文呢?
● 深度學習產物,超過字數可能失真
○ 先斷句再斷詞
Monpa 罔拍
先將長文截成短文,再斷詞
實作連結:
https://colab.research.google.com/drive/
1MvqUZCZleDI62rLSJXd8cNBYAwLfX0Og?
usp=sharing
Monpa 罔拍
更複雜的範例
實作連結:
https://drive.google.com/file/d/1dazZjQb
YwZDiRoavDLug19c4jqZwAOj_/view?usp=
sharing
謝謝大家 要記得填回饋喔~~
連結:
https://forms.gle/xpAEXEGNhmLjbKiB7

Más contenido relacionado

Destacado

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)
 

Destacado (20)

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
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

1020NLP簡報.pptx