1
0
forked from GitHub/gf-rgl

some fixes in wikt-gf extraction

This commit is contained in:
aarneranta
2022-10-12 15:46:47 +02:00
parent dc19b6a88a
commit 96f4543c4c
3 changed files with 1467 additions and 1414 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1239,6 +1239,7 @@ fun 'anamneza_8233_N' : N ;
fun 'ananas_1159_N' : N ;
fun 'anarhija_7592_N' : N ;
fun 'anarhist_7882_N' : N ;
fun 'anarhistički_7692_A' : A ;
fun 'anarhizam_6821_N' : N ;
fun 'anarhičan_55309_A' : A ;
fun 'anarhičnost_55148_N' : N ;
@@ -1680,6 +1681,7 @@ fun 'avangarda_55181_N' : N ;
fun 'avans_5974_N' : N ;
fun 'avantura_37144_N' : N ;
fun 'avanturist_55177_N' : N ;
fun 'avanturistički_37313_A' : A ;
fun 'avanzirati_54541_V' : V ;
fun 'avatar_15_N' : N ;
fun 'avaz_3871_N' : N ;
@@ -1824,6 +1826,7 @@ fun 'baran_4539_N' : N ;
fun 'baratati_47202_V' : V ;
fun 'barbar_15639_N' : N ;
fun 'barbarizam_28399_N' : N ;
fun 'barbarski_28562_A' : A ;
fun 'barbarstvo_47049_N' : N ;
fun 'barbika_9205_N' : N ;
fun 'barel_15935_N' : N ;
@@ -2051,6 +2054,7 @@ fun 'birač_25447_N' : N ;
fun 'biračica_25445_N' : N ;
fun 'bircuz_54656_N' : N ;
fun 'birokracija_37294_N' : N ;
fun 'birokratski_37349_A' : A ;
fun 'birtija_54640_N' : N ;
fun 'biser_5083_N' : N ;
fun 'biskup_6206_N' : N ;
@@ -2824,6 +2828,7 @@ fun 'demižon_42827_N' : N ;
fun 'demokracija_14017_N' : N ;
fun 'demokrat_14075_N' : N ;
fun 'demokratija_3765_N' : N ;
fun 'demokratski_8855_A' : A ;
fun 'demon_626_N' : N ;
fun 'demonizacija_39272_N' : N ;
fun 'demonstrant_12520_N' : N ;
@@ -3590,6 +3595,7 @@ fun 'eufemizam_7658_N' : N ;
fun 'euforija_19410_N' : N ;
fun 'eulogija_14474_N' : N ;
fun 'euro_25_N' : N ;
fun 'europski_14940_A' : A ;
fun 'eutanazija_41789_N' : N ;
fun 'evakuacija_30126_N' : N ;
fun 'evanđelje_14909_N' : N ;
@@ -3597,6 +3603,7 @@ fun 'evidentan_30139_A' : A ;
fun 'evolucija_14920_N' : N ;
fun 'evolucionist_14910_N' : N ;
fun 'evro_4080_N' : N ;
fun 'evropski_28973_A' : A ;
fun 'fabrika_9273_N' : N ;
fun 'fabrikant_30495_N' : N ;
fun 'fagot_1243_N' : N ;
@@ -4014,6 +4021,7 @@ fun 'gnjio_4942_A' : A ;
fun 'gnjiti_10920_V' : V ;
fun 'gnjurac_42158_N' : N ;
fun 'gnjuriti_42165_V' : V ;
fun 'gnjusan_45420_A' : A ;
fun 'gnoj_4955_N' : N ;
fun 'gnojiti_36055_V' : V ;
fun 'gnojivo_38247_N' : N ;
@@ -4901,6 +4909,7 @@ fun 'istovjerac_39909_N' : N ;
fun 'istovjetnost_52667_N' : N ;
fun 'istoznačnica_18341_N' : N ;
fun 'istozvučnica_6761_N' : N ;
fun 'istočni_13777_A' : A ;
fun 'istočnjak_39901_N' : N ;
fun 'istraga_9953_N' : N ;
fun 'istražitelj_31995_N' : N ;
@@ -5091,6 +5100,7 @@ fun 'izravan_15520_A' : A ;
fun 'izravnati_48393_V' : V ;
fun 'izravnavati_48379_V' : V ;
fun 'izraz_8294_N' : N ;
fun 'izrazit_37066_A' : A ;
fun 'izraziti_32591_V' : V ;
fun 'izračiti_1612_V' : V ;
fun 'izračunati_32739_V' : V ;
@@ -5221,6 +5231,7 @@ fun 'jardževan_45398_N' : N ;
fun 'jare_41577_N' : N ;
fun 'jarebica_38531_N' : N ;
fun 'jargovan_45388_N' : N ;
fun 'jarki_14805_A' : A ;
fun 'jasan_5986_A' : A ;
fun 'jasen_11344_N' : N ;
fun 'jasmin_31729_N' : N ;
@@ -5235,6 +5246,7 @@ fun 'java_1778_N' : N ;
fun 'javiti_12778_V' : V ;
fun 'javljati_12766_V' : V ;
fun 'javna kuća_10531_N' : N ;
fun 'javni_14803_A' : A ;
fun 'javor_4338_N' : N ;
fun 'jaz_7419_N' : N ;
fun 'jazavac_29532_N' : N ;
@@ -6972,6 +6984,7 @@ fun 'ljudeskara_11603_N' : N ;
fun 'ljudi_2029_N' : N ;
fun 'ljudina_46520_N' : N ;
fun 'ljudožder_14463_N' : N ;
fun 'ljudski_13191_A' : A ;
fun 'ljudstvo_46524_N' : N ;
fun 'ljuljati_33516_V' : V ;
fun 'ljuljuškati_46679_V' : V ;
@@ -7461,6 +7474,7 @@ fun 'milosrdnost_21067_N' : N ;
fun 'milosrđe_13000_N' : N ;
fun 'milost_6531_N' : N ;
fun 'milostinja_59512_N' : N ;
fun 'milostiv_13123_A' : A ;
fun 'milovati_27097_V' : V ;
fun 'mimar_5437_N' : N ;
fun 'minaret_1255_N' : N ;
@@ -8103,6 +8117,7 @@ fun 'naspati_56609_V' : V ;
fun 'naspavati_56610_V' : V ;
fun 'nasrnuti_24339_V' : V ;
fun 'nasrtati_24148_V' : V ;
fun 'nasrtljiv_54297_A' : A ;
fun 'nastajati_15156_V' : V ;
fun 'nastanak_21235_N' : N ;
fun 'nastaniti_22901_V' : V ;
@@ -9392,8 +9407,10 @@ fun 'otkriti_27757_V' : V ;
fun 'otkrivati_27762_V' : V ;
fun 'otkriće_17148_N' : N ;
fun 'otkup_56420_N' : N ;
fun 'otmen_46067_A' : A ;
fun 'otmica_17560_N' : N ;
fun 'otmičar_19587_N' : N ;
fun 'otmjen_46070_A' : A ;
fun 'otok_5084_N' : N ;
fun 'otok_5085_N' : N ;
fun 'otopiti_38096_V' : V ;
@@ -10240,6 +10257,7 @@ fun 'pogrbiti_54828_V' : V ;
fun 'pogrbljivati_54833_V' : V ;
fun 'pogreb_13115_N' : N ;
fun 'pogrešiti_25347_V' : V ;
fun 'pogrešiv_59949_A' : A ;
fun 'pogreška_13560_N' : N ;
fun 'pogriješiti_14938_V' : V ;
fun 'pogrješka_48448_N' : N ;
@@ -13073,6 +13091,7 @@ fun 'sevdalija_46227_N' : N ;
fun 'sevdalinka_43056_N' : N ;
fun 'sevdisati_46290_V' : V ;
fun 'severac_39902_N' : N ;
fun 'severni_20051_A' : A ;
fun 'severnjak_39911_N' : N ;
fun 'sevlija_57046_N' : N ;
fun 'sezati_15888_V' : V ;
@@ -13231,6 +13250,7 @@ fun 'sjeta_17653_N' : N ;
fun 'sjetiti_8930_V' : V ;
fun 'sjetva_26990_N' : N ;
fun 'sjeverac_39906_N' : N ;
fun 'sjeverni_9624_A' : A ;
fun 'sjevernjak_39921_N' : N ;
fun 'sjećanje_10966_N' : N ;
fun 'sjećati_10111_V' : V ;
@@ -15711,6 +15731,7 @@ fun 'variti_31629_V' : V ;
fun 'varka_25528_N' : N ;
fun 'varljiv_25654_A' : A ;
fun 'varoš_2477_N' : N ;
fun 'varvarski_4123_A' : A ;
fun 'vasiona_16969_N' : N ;
fun 'vata_4323_N' : N ;
fun 'vatra_3074_N' : N ;
@@ -16405,6 +16426,7 @@ fun 'zaoravati_53359_V' : V ;
fun 'zaostajati_26126_V' : V ;
fun 'zaostati_26114_V' : V ;
fun 'zapadati_36655_V' : V ;
fun 'zapadni_13774_A' : A ;
fun 'zapadnjak_39904_N' : N ;
fun 'zapaliti_10128_V' : V ;
fun 'zapamtiti_15474_V' : V ;
@@ -16857,6 +16879,7 @@ fun 'žar_14595_N' : N ;
fun 'žardinijera_2613_N' : N ;
fun 'žargon_7770_N' : N ;
fun 'žarište_19476_N' : N ;
fun 'žarki_23112_A' : A ;
fun 'žarulja_15377_N' : N ;
fun 'žbica_44714_N' : N ;
fun 'žbir_54690_N' : N ;
@@ -16971,4 +16994,5 @@ fun 'žuč_5921_N' : N ;
fun 'žučljiv_54306_A' : A ;
fun 'žvakati_37538_V' : V ;
fun 'žvakač_37464_N' : N ;
}

View File

@@ -127,7 +127,9 @@ def get_forms(pos, forms, word):
if pos == 'noun':
for f in forms:
for g in GENDERS:
if g in f.get('tags', []):
if 'animate' in f.get('tags', []):
dict['gender'] = 'mascAnimate'
elif g in f.get('tags', []):
dict['gender'] = g
tags = f.get('tags', [])
for num in NOUN_FORMS:
@@ -138,7 +140,9 @@ def get_forms(pos, forms, word):
elif pos == 'name':
for f in forms:
for g in GENDERS:
if g in f.get('tags', []):
if 'animate' in f.get('tags', []):
dict['gender'] = 'mascAnimate'
elif g in f.get('tags', []):
dict['gender'] = g
tags = f.get('tags', [])
for num in NOUN_FORMS:
@@ -148,8 +152,9 @@ def get_forms(pos, forms, word):
dict[NOUN_FORMS[num][case]] = unaccent(f['form'])
elif pos == 'adj':
for f in forms:
## print(f)
tags = f.get('tags', [])
if 'positive' in tags and 'indefinite' in tags:
if 'positive' in tags and 'indefinite' not in tags:
for g in ADJ_FORMS:
if g in tags:
for n in ADJ_FORMS[g]: