SlideShare a Scribd company logo
Latviešu valodas
morfosintaktiskais marķētājs
Bakalaura darbs
Pēteris Ņikiforovs
Problēma
Latviešu valodā gandrīz 50% vārdu ir daudznozīmīgi
roku
Problēma
es māju ar roku es roku bedri es klausos roku
lietvārds
siev. dz., vsk.
darbības vārds
vnk. tagadne,
vsk., 1.pers.
lietvārds
vīr. dz., vsk.
Uzdevums
Marķēšana
Morfosintaktiskās īpašības
Es māju ar roku
vietniekvārds darbības vārds prievārds lietvārds
N-fpa---------n-------------
N – lietvārds (noun)
f – siev. dzimte (feminine)
p – daudzskaitlis (plural)
a – akuzatīvs (accusative)
n – nav deminutīvā
- - neattiecas
Risinājums
• Mašīnmācīšanās
• Klasifikācijas uzdevums
• Perceptrons
Pielietojums
• Sintaktiskā parsēšana
• Nosaukto entitāšu atrašana
• Terminu identificēšana
• Mašīntulkošana – faktorētie modeļi
Korpusi
Nosaukums Skaits
Teikumi 7021
Tekstvienības 108043
Unikālās tekstvienības 22952
Tagi 441
Daudznozīmīgās tekstvienības 49%
Nosaukums Skaits
Teikumi 7462
Tekstvienības 126230
Unikālās tekstvienības 25884
Tagi 1594
Normalizēti tagi 984
Daudznozīmīgās tekstvienības 47%
Populārākie tagi
Tags Skaits
N-fsg---------n------------- 1919
---------------------------- 1817
N-fpa---------n------------- 1553
N-fpa---------n------------- 1449
N-fpn---------n------------- 1466
N-fsa---------n------------- 1275
N-fsn---------n------------- 1257
Tags Skaits
v__i___30 1851
n_fsg 1817
n_fpn 1783
n_fpa 1745
n_fsn 1727
n_msv 1700
n_fpv 1680
Perceptrons
• Pārraudzītās mašīnmācīšanās algoritms
• Lineārā klasifikācija
• Vairāku klašu perceptrons
• Vidējais perceptrons
• Pakāpeniska (online) mācīšanās
• Kļūdu vadīts (error driven)
Pazīmes
Uzdevums
Ievaddati
Svari no apmācībām
Vārdšķiras noteikšana
vietniekvārds = 1 + 3 + 0 = 4
Vārdšķiras noteikšana
darbības vārds = -1 + 6 + 3 = 8
lietvārds = 2 + 2 + 1 = 5
Izvaddati
Diagramma
Apmācības
• Atkārto 1 .. n reizes:
• sajauc teikumus jauktā secībā
• katram teikumam:
• katram vārdam teikumā:
• pareģo vārdšķiru, kā iepriekš stāstīts
• vai pareģoja pareizi?
• ja jā, tad ejam tālāk
• citādi
• pieskaitām +1 svariem pazīmēm pareizajai vārdšķirai
• pieskaitām -1 svariem pazīmēm nepareizi pareģotajai vārdšķirai
Apmācības
vietniekvārds = 0 + 0 + 0 = 0
Apmācības
lietvārds = 0 + 0 + 0 = 0
darbības vārds = 0 + 0 + 0 = 0
Apmācības
Vidējais perceptrons
funkcija apmācības(F, T, S, it)
Wt,f = 0 katram t ∈ T, f ∈ F
atkārtot it reizes
katram s ∈ S
h = ∅
atkārtot i no 1 līdz |s|
t = arg maxt scoret(i, s, h)
ja t ≠ t
katram f ∈ F
Wt,f += 1 ∙ f(i,s,h)
Wt^,f -= 1 ∙ f(i,s,h)
h += t
atgriež W
funkcija apmācības(F, T, S, it)
Wt,f = 0 katram t ∈ T, f ∈ F
Ut,f = 0 katram t ∈ T, f ∈ F
c = 1
atkārtot it reizes
katram s ∈ S
h = ∅
atkārtot i no 1 līdz |s|
t = arg maxt scoret(i, s, h)
ja t ≠ t
katram f ∈ F
Wt,f += 1 ∙ f(i,s,h)
Wt^,f -= 1 ∙ f(i,s,h)
Ut,f += 1 ∙ f(i,s,h) ∙ c
Ut^,f -= 1 ∙ f(i,s,h) ∙ c
h += t
c += 1
atgriež W - U ∙ 1/c
A Course in Machine Learning - Hal Daumé III
http://www.ciml.info/dl/v0_8/ciml-v0_8-ch03.pdf#page=14
Pazīmes
Skaits
Pazīmju skaits
(vismaz 1x)
58 534
Tagi (vismaz 1x) 654
Pazīmes no katra
taga
173 873
Eksperimenti
• pašreizējais vārds
• nākamais vārds
• iepriekšējais vārds
• iepriekšējā vārda vārdšķira
• iepriekšējā vārda tags
• iepriekšējie divu vārdi
• iepriekšējo divu vārdu tagi
• nākamie divi vārdi
• iepriekšējais un nākamais vārds
• pašreizējā vārda pēdējie 4 burti
• pašreizējā vārda pēdējie 3 burti
• pašreizējā vārda pēdējie 2 burti
• pašreizējā vārda pēdējais burts
• pēdējā iepriekšējā lietvārda tags
• iepriekšējā lietvārda vai prievārda,
kurš nav ģenitīva vai lokatīva
locījumā, tags
Eksperimenti
93.2 93.4 93.6 93.8 94 94.2 94.4 94.6 94.8 95 95.2 95.4
Tilde
LU MII
Precizitāte ar parasto un vidējo perceptronu
Vidējais Parastais
Eksperimenti
94.5
94.6
94.7
94.8
94.9
95
95.1
95.2
95.3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Iterāciju skaits un precizitāte
Eksperimenti
90.4 90.8 91.2 91.6 92 92.4 92.8 93.2 93.6 94 94.4 94.8 95.2 95.6
Tilde
LU MII
Vārdu secība un precizitāte
Parasta Apgriezta
Rezultāti
Precizitāte ar 10-kārtīgu šķērsvalidāciju
Korpuss Vārdšķira Tags Lemma Kopējais
Tilde 98,58% 95,21% 99,27% 95,20%
LU MII 98,29% 94,33% 98,24% 94,32%
Ticamības
intervāls LU MII Tilde
90% 94,19 - 94,45 95,10 - 95,30
95% 94,17 - 94,47 95,09 - 95,32
99% 94,12 - 94,52 95,05 - 95,36
Rezultāti
Salīdzinājums ar citiem marķētājiem
Citas valodas
Zinātniskais raksts Precizitāte rakstā Perceptrons
Pinnis un Goba (2011) 91,51% 94,83%
Paikens et al. (2013) 93,6% 93,67%
Valoda Vārdšķira Tags Lemma Kopējais
Lietuviešu 98,12% 93,95% 99,06% 93,93%
Igauņu 98,65% 97,26% 99,16% 97,01%
Paveiktais
• Bakalaura darbs
• Problēmas apraksts &
piedāvātais risinājums
• Priekšapstrāde
• Morfoloģija un korpusi
• Markēšana
• Perceptrons
• Citi rīki
• Implementācija
• Eksperimenti
• Novērtēšana
• Kļūdu analīze

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
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
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
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...
 

Latviešu valodas morfosintaktiskais marķētājs

Editor's Notes

  1. Pirms es izskaidroju, kas ir morfosintaktiskais marķētājs vēlos sākt ar problēmas aprakstu. Latviešu valodā gandrīz puse vārdu ir daudznozīmīgi jeb neviennozīmīgi. Tas nozīmē, ka vārdiem var būt vairākas nozīmes. Piemēram, vārds «roku» var būt gan lietvāds (es māju ar roku), gan darbības vārds (es roku bedri), gan arī vīriešu dzimtes lietvārds (es klausos roku).
  2. Noteikt, kura nozīme ir domāta, var, redzot kontekstu. Mums kā cilvēkiem tas nesagādā problēmas. Bet datoriem nav tādas intuīcijas kā mums.
  3. Tātad marķēšana jeb tagošana, kas patiesībā ir oficiālais termins, ir pareizās vārda vārdšķiras noteikšana katram vārdam teikumā. Mūs parasti interesē vairāk informācijas nekā tikai vārdšķira (piemēram, skaitlis, dzimte, locījums), un tās sauc par morfosintaktiskajām īpašībām. Morfoloģija ir valodniecības nozare, kas pēta vārda uzbūvi. Sintakse pēta struktūru. Morfosintaktiskās īpašības var kompakti iekodēt teksta virknē, ko sauc par tagu.
  4. Ir gan likumu, gan mašīnmācīšanās risinājumi. Mašīnmācīšanās ir piemērota tēma bakalaura darbam. Tā kā tagu skaits ir pārskaitāms, tad tas ir klasifikācijas uzdevums – jāizvēlas viens no tagiem katram vārdam. Izmantoju perceptrona algoritmu, kas sasniedz labākos rezultātus citām valodām.
  5. Marķēšanu neveic vien prieka pēc. Tam ir vairāki pielietojumi datorlingvistikā. Piemēram, sintaktiskajā parsēšanā un terminu identificēšanā, kur termini ir pārsvarā lietvārdi. Pats praktiski izmantoju mašīntulkošanā.
  6. Tā kā perceptrons ir pārraudzītās mašīnmācīšanās algoritms, tad nepieciešami marķēti dati apmācībām. Tas ir laikietilpīgs darbs, tāpēc izmantoju gatavus. Teksti parasti ir līdzsvaroti, ar morfo analizatoru atrod visas nozīmes un cilvēks izvēlas. Ne to korpusu ierakstīju darbā. Kā redzams, aptuveni puse ir daudznozīmīgi.
  7. muzicēs vmnift230an v verb m main n neatgr i īstenības f nākotne t transitive 2 konjugācija 3 persona 0 skaitlis, 3. persona a active darāmā kārta n noliegums
  8. Pazīmju ir ļoti daudz un tās bieži vien attiecas tikai uz dažiem vārdiem.