From 8ffaf2d0666f6c16ee9a0d4bd28d8c2afd9b169e Mon Sep 17 00:00:00 2001 From: Jack Rueter Date: Wed, 8 Nov 2023 17:13:13 +0200 Subject: [PATCH] Deal with raw apertium tags in giella Add some case tags and +PxSP3 Or do we want +Px3 @flammie --- src/fst/affixes/nouns.lexc | 7 ++- src/fst/affixes/verbs.lexc | 103 +++++++++++++++++++++------------ src/fst/root.lexc | 9 ++- src/fst/stems/adpositions.lexc | 3 +- src/fst/stems/numerals.lexc | 22 +++---- src/fst/stems/pronouns.lexc | 36 ++++++++---- 6 files changed, 115 insertions(+), 65 deletions(-) diff --git a/src/fst/affixes/nouns.lexc b/src/fst/affixes/nouns.lexc index 866d4ef..615c8e0 100644 --- a/src/fst/affixes/nouns.lexc +++ b/src/fst/affixes/nouns.lexc @@ -281,12 +281,13 @@ LEXICON NOUN_COMP LEXICON ACRO_SGNOM_0 -%%:0 # ; +!%%:0 # ; ++Sg+Nom:0 # ; LEXICON ACRO_CASES -%%:n # ; - +!%%:n # ; ++Sg+Gen:n # ; diff --git a/src/fst/affixes/verbs.lexc b/src/fst/affixes/verbs.lexc index 3de6942..8eb6d10 100644 --- a/src/fst/affixes/verbs.lexc +++ b/src/fst/affixes/verbs.lexc @@ -251,40 +251,55 @@ LEXICON VERB_COND_PASSIVE_TÄIS LEXICON AUX_PCP !! **LEXICON @LEXNAME@** !! FIXME -%:t # ; -%+Sg%:n # ; +!%:t # ; +!%+Sg%:n # ; ++PrfPrc:t # ; ++PrfPrc+Sg+Gen:n # ; LEXICON AUX_3SG_PI !! **LEXICON @LEXNAME@** -+Act%%+Sg:pi # ; +!+Act%%+Sg:pi # ; ++Act+Ind+Prs+Sg3:pi # ; LEXICON AUX_3SG_0 -!! **LEXICON @LEXNAME@** -+Act%%+Sg:0 # ; +!! **LEXICON @LEXNAME@** +!+Act%%+Sg:0 # ; ++Act+Ind+Prs+Sg3:0 # ; LEXICON AUX_3SG_Y !! **LEXICON @LEXNAME@** -+Act%%+Sg:y # ; +!+Act%%+Sg:y # ; ++Act+Ind+Prs+Sg3:y # ; LEXICON AUX_CONNEG_0 !! **LEXICON @LEXNAME@** -+Act%%:0 # ; +!+Act%%:0 # ; ++Act+Ind+Prs+ConNeg:0 # ; LEXICON AUX_PRES_FRONT !! **LEXICON @LEXNAME@** -+Act%%+Sg:n # ; -+Act%%+Sg:t # ; -+Act%%%:mmä # ; -+Act%%%:ttä # ; +!+Act%%+Sg:n # ; +!+Act%%+Sg:t # ; +!+Act%%%:mmä # ; +!+Act%%%:ttä # ; ++Act+Ind+Prs+Sg1:n # ; ++Act+Ind+Prs+Sg2:t # ; ++Act+Ind+Prs+Pl1:mmä # ; ++Act+Ind+Prs+Pl2:ttä # ; LEXICON AUX_PRES_BACK !! **LEXICON @LEXNAME@** -+Act%%+Sg:n # ; -+Act%%+Sg:t # ; -+Act%%+Sg%:tko # ; -+Act%%%:mma # ; -+Act%%%:tta # ; +!+Act%%+Sg:n # ; +!+Act%%+Sg:t # ; +!+Act%%+Sg%:tko # ; +!+Act%%%:mma # ; +!+Act%%%:tta # ; ++Act+Ind+Prs+Sg1:n # ; ++Act+Ind+Prs+Sg2:t # ; ++Act+Ind+Prs+Sg2:tko # ; ++Act+Ind+Prs+Pl1:mma # ; ++Act+Ind+Prs+Pl2:tta # ; !!!LEXICON AUX_PAST_WEAK_FRONT !!! @@ -295,31 +310,44 @@ LEXICON AUX_PRES_BACK LEXICON AUX_PAST_WEAK_BACK !! **LEXICON @LEXNAME@** -+Act%%+Sg:in # ; -+Act%%+Sg:it # ; -+Act%%%:imma # ; -+Act%%%:itta # ; +!+Act%%+Sg:in # ; +!+Act%%+Sg:it # ; +!+Act%%%:imma # ; +!+Act%%%:itta # ; ++Act+Ind+Prt+Sg1:in # ; ++Act+Ind+Prt+Sg2:it # ; ++Act+Ind+Prt+Pl1:imma # ; ++Act+Ind+Prt+Pl2:itta # ; LEXICON AUX_PAST_3SG_0 !! **LEXICON @LEXNAME@** -+Act%%+Sg:0 # ; +!+Act%%+Sg:0 # ; ++Act+Ind+Prt+Sg3:0 # ; LEXICON AUX_PASSIVE_H -+Act%%%:h # ; -%%:h # ; +!+Act%%%:h # ; +!%%:h # ; ++Act+Ind+Prt+Pl3:h # ; ++Pss+Ind+Prt:h # ; LEXICON AUX_PAST_PASSIVE_H -+Act%%%:h # ; -%%:h # ; +!+Act%%%:h # ; +!%%:h # ; ++Act+Ind+Prt+Pl3:h # ; ++Pss+Ind+Prt:h # ; LEXICON AUX_COND -+Act%%+Sg:isin # ; -+Act%%+Sg:isit # ; -+Act%%+Sg:is # ; -+Act%%+Sg%:isko # ; +!+Act%%+Sg:isin # ; +!+Act%%+Sg:isit # ; +!+Act%%+Sg:is # ; +!+Act%%+Sg%:isko # ; ++Act+Cond+Sg1:isin # ; ++Act+Cond+Sg2:isin # ; ++Act+Cond+Sg3:is # ; ++Act+Cond+Sg3+Qst:isko # ; LEXICON AUX_INF_A @@ -332,7 +360,8 @@ LEXICON AUX_INF_Ä LEXICON AUX_INF_E +Inf+Ine:ešša # ; -+Inf+Ine%:eššah # ; +!+Inf+Ine%:eššah # ; ++Inf+Ine+PxSP3:eššah # ; LEXICON AUX_INF_MA @@ -353,16 +382,18 @@ LEXICON AUX_INF_MÄ LEXICON AUX_PCP_TY -%%+Sg%:ty # ; -%%+Sg%%:työh # ; +!%%+Sg%:ty # ; +!%%+Sg%%:työh # ; ++Pss+PrfPrc+Sg+Nom:ty # ; ++Pss+PrfPrc+Sg+Par+PxSP3:työh # ; LEXICON AUX_PCP_N -+Act%:n # ; -+Act%+Sg%:n # ; - - +!+Act%:n # ; +!+Act%+Sg%:n # ; ++Act+PrfPrc:n # ; ++Act+Ind+Prt+Sg+ConNeg:n # ; ! vim: set ft=xfst-lexc: diff --git a/src/fst/root.lexc b/src/fst/root.lexc index f6b6da5..66d01fc 100644 --- a/src/fst/root.lexc +++ b/src/fst/root.lexc @@ -32,7 +32,8 @@ Multichar_Symbols !!≈ # Definitions for @CODE@ !! The parts-of-speech are: +N +A +Adv +V !!≈ * **@CODE@** +Pron +CS +CC +Adp +Po +Pr +Interj +Pcle +Num !!≈ * **@CODE@** - + +C !!≈ * **@CODE@** TYÖÖÖÖ! this need depricating :-) 2023-11-08 Jaska + !! The parts of speech are further split up into: +Prop +Pers +Dem +Interr +Refl +Recipr +Rel +Indef !!≈ * **@CODE@** @@ -45,14 +46,18 @@ Multichar_Symbols !!≈ # Definitions for @CODE@ !! The nominals are inflected in the following Case and Number +Sg +Du +Pl !!≈ * **@CODE@** +Ess +Nom +Gen +Acc +Ill +Loc +Com +Com/Sh !!≈ * **@CODE@** + +Ine +Ill +Ela +Par +Tra +Ins !! The possession is marked as such: +PxSg1 +PxSg2 +PxSg3 +PxDu1 +PxDu2 +PxDu3 +PxPl1 +PxPl2 +PxPl3 !!≈ * **@CODE@** + +PxSP3 !! The comparative forms are: - +Comp +Superl !!≈ * **@CODE@** + +Pos +Comp +Superl !!≈ * **@CODE@** !! Numerals are classified under: +Attr +Card !!≈ * **@CODE@** +Ord !!≈ * **@CODE@** +!! Verb voices are: ++Act +Pss !! Verb moods are: +Ind +Prs +Prt +Pot +Cond +Imprt !!≈ * **@CODE@** !! Verb personal forms are: diff --git a/src/fst/stems/adpositions.lexc b/src/fst/stems/adpositions.lexc index 05f9f2c..939a339 100644 --- a/src/fst/stems/adpositions.lexc +++ b/src/fst/stems/adpositions.lexc @@ -382,7 +382,8 @@ eh postposition ; LEXICON postposition -+Post: # ; +!+Post: # ; ++Adp+Po: # ; LEXICON preposition +Pr: # ; diff --git a/src/fst/stems/numerals.lexc b/src/fst/stems/numerals.lexc index 0e1195b..e45bc4e 100644 --- a/src/fst/stems/numerals.lexc +++ b/src/fst/stems/numerals.lexc @@ -20,17 +20,17 @@ kymmenen+Num+Card:kymmene NUM_KYMMENE/N ; miljon+Num+Card:miljon NUM_MILJON/A ; miljardi+Num+Card:miljard NUM_MILJARD/I ; -enšimäini+Adj+Ord:enšimäi NUM_ENŠIMMÄI/NI ; -enšimmäini+Adj+Ord:enšimmäi NUM_ENŠIMMÄI/NI ; -toini+Adj+Ord:toi NUM_TOI/NI ; -kolmaš+Adj+Ord:kolma NUM_KOLMA/Š ; -nelläš+Adj+Ord:nellä NUM_NELLÄ/Š ; -viiješ+Adj+Ord:viije NUM_NELLÄ/Š ; -kuuvveš+Adj+Ord:kuuvve NUM_KOLMA/Š ; -seiččemeš+Adj+Ord:seiččeme NUM_NELLÄ/Š ; -kahekšaš+Adj+Ord:kahekša NUM_KOLMA/Š ; -yhekšäš+Adj+Ord:yhekšä NUM_NELLÄ/Š ; -kymmeneš+Adj+Ord:kymmene NUM_NELLÄ/Š ; +enšimäini+A+Ord:enšimäi NUM_ENŠIMMÄI/NI ; +enšimmäini+A+Ord:enšimmäi NUM_ENŠIMMÄI/NI ; +toini+A+Ord:toi NUM_TOI/NI ; +kolmaš+A+Ord:kolma NUM_KOLMA/Š ; +nelläš+A+Ord:nellä NUM_NELLÄ/Š ; +viiješ+A+Ord:viije NUM_NELLÄ/Š ; +kuuvveš+A+Ord:kuuvve NUM_KOLMA/Š ; +seiččemeš+A+Ord:seiččeme NUM_NELLÄ/Š ; +kahekšaš+A+Ord:kahekša NUM_KOLMA/Š ; +yhekšäš+A+Ord:yhekšä NUM_NELLÄ/Š ; +kymmeneš+A+Ord:kymmene NUM_NELLÄ/Š ; pari+Num+Card:pari NUM_PARI ; puolitoista+Num+Card:puolitoista # ; diff --git a/src/fst/stems/pronouns.lexc b/src/fst/stems/pronouns.lexc index 335ec42..dfb6758 100644 --- a/src/fst/stems/pronouns.lexc +++ b/src/fst/stems/pronouns.lexc @@ -62,7 +62,8 @@ LEXICON PRON_MI/E 0:e PRON_SGNOM_0 ; 0:u PRON_CASES_SG_BACK ; -%%:lma # ; +!%%:lma # ; ++Sg+Par:lma # ; LEXICON PRON_H/IÄN !! **LEXICON @LEXNAME@** @@ -82,7 +83,8 @@ LEXICON PRON_TÄ/MÄ 0 PRON_CASES_SG_FRONT ; 0 PRON_SGPAR_TÄ ; 0:mä PRON_SGGEN_N ; -%%:hä # ; +!%%:hä # ; ++Sg+Ill:hä # ; LEXICON PRON_NÄ/MÄ !! **LEXICON @LEXNAME@** @@ -104,19 +106,27 @@ LEXICON PRON_Š/E !! **LEXICON @LEXNAME@** 0:e PRON_SGNOM_0 ; 0:i PRON_CASES_SG_FRONT ; -%%:en # ; -%%:iinä # ; -%%:iitä # ; -%%:iih # ; -%%:inne # ; -%%:itä # ; +!%%:en # ; +!%%:iinä # ; +!%%:iitä # ; +!%%:iih # ; +!%%:inne # ; +!%%:itä # ; ++Sg+Gen:en # ; ++Sg+Ine:iinä # ; ++Sg+Ela:iitä # ; ++Sg+Ill:iih # ; ++Sg+Ill:inne # ; ++Sg+Par:itä # ; LEXICON PRON_N/E !! **LEXICON @LEXNAME@** 0:e PRON_PLNOM_0 ; 0:i PRON_CASES_PL_FRONT ; -%%:iijen # ; -%%:iihi # ; +!%%:iijen # ; +!%%:iihi # ; ++Pl+Gen:iijen # ; ++Pl+Ill:iihi # ; LEXICON PRON_IČ/E !! **LEXICON @LEXNAME@** @@ -130,8 +140,10 @@ LEXICON PRON_KAI/KKI 0:kki PRON_SGNOM_0 ; 0:ke PRON_CASES_SG_WEAK_BACK ; 0:k PRON_CASES_PL_WEAK_BACK ; -%%:kin # ; -%%:kkine # ; +!%%:kin # ; +!%%:kkine # ; ++Pl+Ins:kin # ; ++Pl+Com:kkine # ; LEXICON PRON_KU/DAI !! **LEXICON @LEXNAME@**