ESSLLI CG course

From Apertium
Jump to navigation Jump to search

Using Apertium to analyse esslli-cg-relevant languages

You may either use the Vislcg3 cg lab, or you may download the Apertium resources.

Use the Vislcg3 lab and download the Apertium cg file

Here is the file:

  1. Download the file, and upload it to the visl lab page.
  2. Write in a sentence and test the result
  3. Change the rlx file to the better

Download the whole catalogue from Apertium

Serbo-Croatian

SVN: https://apertium.svn.sourceforge.net/svnroot/apertium/incubator/apertium-sh-mk

$ echo "Radovanović je ušla u povijest kao prva žena-pilot u Srbiji." | lt-proc sh-mk.automorf.bin  | cg-conv -a

"<Radovanović>"
	"Radovanović" np cog f sg nom 
	"Radovanović" np cog f sg gen 
	"Radovanović" np cog f sg dat 
	"Radovanović" np cog f sg acc 
	"Radovanović" np cog f sg loc 
	"Radovanović" np cog f sg ins 
	"Radovanović" np cog f sg voc 
	"Radovanović" np cog f pl nom 
	"Radovanović" np cog f pl gen 
	"Radovanović" np cog f pl dat 
	"Radovanović" np cog f pl acc 
	"Radovanović" np cog f pl loc 
	"Radovanović" np cog f pl ins 
	"Radovanović" np cog f pl voc 
	"Radovanović" np cog ma sg nom 
	"Radovanović" np cog ma sg voc 
"<je>"
	"biti" vbser clt pres p3 sg 
	"clitic" prn pers clt p3 f sg gen 
	"clitic" prn pers clt p3 f sg acc 
"<ušla>"
	"ući" vblex perf iv lp nt pl 
	"ući" vblex perf iv lp f sg 
	"ući" vblex perf iv lp m pl 
	"ući" vblex perf iv opt nt pl 
	"ući" vblex perf iv opt f sg 
	"ući" vblex perf iv opt m pl 
"<u>"
	"u" pr 
"<povijest>"
	"povijest" n f sg nom 
	"povijest" n f sg acc 
"<kao>"
	"kao" adv 
"<prva>"
	"prvi" num ord nt pl nom 
	"prvi" num ord nt pl acc 
	"prvi" num ord nt pl voc 
	"prvi" num ord f sg nom 
	"prvi" num ord f sg voc 
"<žena>"
	"žena" n f sg nom 
	"žena" n f pl gen 
"<->"
	"-" guio 
"<pilot>"
	"pilot" n ma sg nom 
"<u>"
	"u" pr 
"<Srbiji>"
	"Srbija" np top f sg dat 
	"Srbija" np top f sg loc 
"<.>"
	"." sent 


$ echo "Radovanović je ušla u povijest kao prva žena-pilot u Srbiji." | lt-proc sh-mk.automorf.bin  | cg-conv -a | vislcg3 --trace --grammar apertium-sh-mk.sh-mk.rlx 

"<Radovanović>"
	"Radovanović" np cog f sg nom SELECT:222:Nom+Perfect 
;	"Radovanović" np cog f pl nom REMOVE:219 
;	"Radovanović" np cog f sg gen SELECT:222:Nom+Perfect 
;	"Radovanović" np cog f sg dat SELECT:222:Nom+Perfect 
;	"Radovanović" np cog f sg acc SELECT:222:Nom+Perfect 
;	"Radovanović" np cog f sg loc SELECT:222:Nom+Perfect 
;	"Radovanović" np cog f sg ins SELECT:222:Nom+Perfect 
;	"Radovanović" np cog f sg voc SELECT:222:Nom+Perfect 
;	"Radovanović" np cog f pl gen SELECT:222:Nom+Perfect 
;	"Radovanović" np cog f pl dat SELECT:222:Nom+Perfect 
;	"Radovanović" np cog f pl acc SELECT:222:Nom+Perfect 
;	"Radovanović" np cog f pl loc SELECT:222:Nom+Perfect 
;	"Radovanović" np cog f pl ins SELECT:222:Nom+Perfect 
;	"Radovanović" np cog f pl voc SELECT:222:Nom+Perfect 
;	"Radovanović" np cog ma sg nom SELECT:222:Nom+Perfect 
;	"Radovanović" np cog ma sg voc SELECT:222:Nom+Perfect 
"<je>"
	"biti" vbser clt pres p3 sg 
;	"clitic" prn pers clt p3 f sg gen REMOVE:182:jeIsNotGenitive 
;	"clitic" prn pers clt p3 f sg acc REMOVE:185:jeIsNotAccusative 
"<ušla>"
	"ući" vblex perf iv lp f sg SELECT:200:PerfectNotOptative SELECT:206:l-participleNumber 
;	"ući" vblex perf iv opt nt pl SELECT:200:PerfectNotOptative 
;	"ući" vblex perf iv opt f sg SELECT:200:PerfectNotOptative 
;	"ući" vblex perf iv opt m pl SELECT:200:PerfectNotOptative 
;	"ući" vblex perf iv lp nt pl SELECT:200:PerfectNotOptative SELECT:206:l-participleNumber 
;	"ući" vblex perf iv lp m pl SELECT:200:PerfectNotOptative SELECT:206:l-participleNumber 
"<u>"
	"u" pr 
"<povijest>"
	"povijest" n f sg acc SELECT:308:Pr-Acc-chain 
;	"povijest" n f sg nom SELECT:308:Pr-Acc-chain 
"<kao>"
	"kao" adv 
"<prva>"
	"prvi" num ord f sg nom SELECT:237:GenNumNext SELECT:245 
;	"prvi" num ord nt pl nom SELECT:237:GenNumNext 
;	"prvi" num ord nt pl acc SELECT:237:GenNumNext 
;	"prvi" num ord nt pl voc SELECT:237:GenNumNext 
;	"prvi" num ord f sg voc SELECT:237:GenNumNext SELECT:245 
"<žena>"
	"žena" n f sg nom SELECT:243:AtrrNum->NNum 
;	"žena" n f pl gen SELECT:243:AtrrNum->NNum 
"<->"
	"-" guio 
"<pilot>"
	"pilot" n ma sg nom 
"<u>"
	"u" pr 
"<Srbiji>"
	"Srbija" np top f sg loc SELECT:317:Pr-Loc-chain 
;	"Srbija" np top f sg dat SELECT:317:Pr-Loc-chain 
"<.>"
	"." sent 

Turkish

SVN: https://apertium.svn.sourceforge.net/svnroot/apertium/incubator/apertium-tr-az

Trmorph: http://www.let.rug.nl/~coltekin/trmorph/ (you need the Apertium branch, see Trmorph)

$ echo "Kovayla bira içerim, ama sen bilmezsin." | hfst-proc tr-az.automorf.hfst  | cg-conv -a

"<Kovayla>"
	"Kova" n ins 
	"Kova" n ins 3s 
"<bira>"
	"bira" n 
	"bira" n 3s 
"<içerim>"
	"iç" v t_aor 1s 
	"içeri" n 1s 
	"içeri" n p1s 
	"içeri" n p1s 3s 
"<,>"
	"," pnct 
"<ama>"
	"ama" cnjadv 
	"ama" cnjcoo 
	"ama" n 
	"ama" n 3s 
"<sen>"
	"sen" prn pers 
	"sen" prn pers 3s 
"<bilmezsin>"
	"bil" v neg t_aor 2s 
"<.>"
	"." pnct 


$ echo "Kovayla bira içerim, ama sen bilmezsin." | hfst-proc tr-az.automorf.hfst  | cg-conv -a | vislcg3 --trace --grammar apertium-tr-az.tr-az.rlx 

"<Kovayla>"
	"Kova" n ins 
;	"Kova" n ins 3s REMOVE:521 
"<bira>"
	"bira" n 
;	"bira" n 3s REMOVE:521 
"<içerim>"
	"iç" v t_aor 1s 
	"içeri" n 1s 
;	"içeri" n p1s 3s REMOVE:521 
;	"içeri" n p1s REMOVE:531 
"<,>"
	"," pnct 
"<ama>"
	"ama" cnjadv 
	"ama" cnjcoo 
	"ama" n 
;	"ama" n 3s REMOVE:521 
"<sen>"
	"sen" prn pers 
;	"sen" prn pers 3s REMOVE:521 
"<bilmezsin>"
	"bil" v neg t_aor 2s 
"<.>"
	"." pnct 

Bulgarian

SVN: https://apertium.svn.sourceforge.net/svnroot/apertium/trunk/apertium-mk-bg

$ echo "Айтоска река е река в България." | lt-proc bg-mk.automorf.bin | cg-conv -a

"<Айтоска>"
	"*Айтоска" 
"<река>"
	"река" n f sg nom ind 
	"рече" vblex perf tv pres p1 sg 
"<е>"
	"е" vbser pres p3 sg 
"<река>"
	"река" n f sg nom ind 
	"рече" vblex perf tv pres p1 sg 
"<в>"
	"в" pr 
"<България>"
	"България" np top f sg nom 
"<.>"
	"." sent 

$ echo "Айтоска река е река в България." | lt-proc bg-mk.automorf.bin | cg-conv -a | vislcg3 --trace --grammar apertium-mk-bg.bg-mk.rlx 

"<Айтоска>"
	"*Айтоска" 
"<река>"
	"река" n f sg nom ind 
;	"рече" vblex perf tv pres p1 sg REMOVE:63:r2 
"<е>"
	"е" vbser pres p3 sg 
"<река>"
	"река" n f sg nom ind 
	"рече" vblex perf tv pres p1 sg 
"<в>"
	"в" pr 
"<България>"
	"България" np top f sg nom 
"<.>"
	"." sent 

Slovenian

SVN: https://apertium.svn.sourceforge.net/svnroot/apertium/incubator/apertium-sl-es

$ echo "Od tukaj se vidi vse mesto." | lt-proc sl-es.automorf.bin | cg-conv -a
Codepage UTF-8, locale en_US_POSIX
Converting Apertium to VISL...
Warning: No soft or hard delimiters defined in grammar. Hard limit of 500 cohorts may break windows in unintended places.
"<Od>"
	"Od" pr 
	"Oda" n f du gen 
	"Oda" n f pl gen 
"<tukaj>"
	"tukaj" adv 
"<se>"
	"se" prn ref mf sp loc 
	"se" prn ref mf sp ins 
	"se" prn ref mf sp gen 
	"se" prn ref mf sp acc 
"<vidi>"
	"*vidi" 
"<vse>"
	"vse" adv 
	"ves" prn ind m pl acc 
	"ves" prn ind f sg gen 
	"ves" prn ind f pl nom 
	"ves" prn ind f pl acc 
	"ves" prn ind nt sg nom 
	"ves" prn ind nt sg acc 
	"ves" det ind m pl acc 
	"ves" det ind f sg gen 
	"ves" det ind f pl nom 
	"ves" det ind f pl acc 
	"ves" det ind nt sg nom 
	"ves" det ind nt sg acc 
"<mesto>"
	"mesto" n nt sg nom 
	"mesto" n nt sg acc 
"<.>"
	"." sent