Skip to content

Commit

Permalink
fixed regular expression in lexc - still needs fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
Juutitta committed Nov 8, 2024
1 parent e24c69d commit 9757fae
Showing 1 changed file with 38 additions and 33 deletions.
71 changes: 38 additions & 33 deletions src/fst/morphology/affixes/inflections-nouns.lexc
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,8 @@ LEXICON poss_truncative
@U.2SGPOSS.YES@+N+2SgPoss case_2poss ;
@U.2SGPOSS.NO@+N+2PlPoss case_2poss ;
!3.person possessor
@U.3SGPOSS.YES@+N+3SgPoss:@U.3SGPOSS.YES@a case_3poss ;
@U.3SGPOSS.YES@+N+3SgPoss:@U.3SGPOSS.YES@i case_3poss ;
@U.3SGPOSS.NO@+N+3PlPoss:@U.3SGPOSS.NO@at case_3poss ;
@U.3SGPOSS.NO@+N+3PlPoss:@U.3SGPOSS.NO@i case_3poss ; !actually "it", but doesn't matter here, original %POSSESSORTRUNC deprecated
@U.3SGPOSS.YES@+N+3SgPoss case_3poss ;
+N+3PlPoss case_3poss ;
!4.person possessor
@U.4SGPOSS.YES@+N+4SgPoss case_4poss ;
@U.4SGPOSS.NO@+N+4PlPoss case_4poss ;
Expand All @@ -99,16 +97,16 @@ LEXICON case_1poss
LEXICON 1sgposs
+Abs+Pl:kka K_plur ; !tp
+Rel+Pl+Orth/Alt:mma K_plur ; !tp
< %+Rel:{ma} [ %+Sg | %+Pl ] > K_plur ; !tp
< %+Via:{kkut} [ %+Sg | %+Pl ] > ViaVb ; !tp
< {ma} %+Rel:0 [ %+Sg:0 | %+Pl:0 ] > K_plur ; !tp
< {kkut} %+Via:0 [ %+Sg:0 | %+Pl:0 ] > ViaVb ; !tp
^C1 poss_case_ALL ;

LEXICON 1plposs
+Abs+Sg:rput Krestr ; !tp !regel %TRUNC r p u t -> p u t || k _
+Abs+Pl:vut K_plur ; !tp
+Abs+Pl+Orth/Alt:gut K_plur ; !livm 20170927 der mangler en regel for at g -> r ikke skal gælde her
< %+Rel:{tta} [ %+Sg | %+Pl ] > Krestr ; !tp
< %+Via:{tsigut} [ %+Sg | %+Pl ] > ViaVb ; !tp
< {tta} %+Rel:0 [ %+Sg:0 | %+Pl:0 ] > Krestr ; !tp
< {tsigut} %+Via:0 [ %+Sg:0 | %+Pl:0 ] > ViaVb ; !tp
tsi^C2 poss_case_ALL ;

LEXICON case_2poss
Expand All @@ -119,8 +117,8 @@ LEXICON 2sgposs
+Abs+Sg:t Krestr ; !tp MIGHT NEED separate lexicon
+Abs+Pl:tit K_plur ; !tp
+Rel+Sg+Orth/Youth:rpit Krestr ; !tp
< %+Rel:{vit} [ %+Sg | %+Pl ] > Krestr ; !tp regel %TRUNC r p i t -> p i t || k _
< %+Via:{kkut} [ %+Sg | %+Pl ] > ViaVb ; !tp
< {vit} %+Rel:0 [ %+Sg:0 | %+Pl:0 ] > Krestr ; !tp regel %TRUNC r p i t -> p i t || k _
< {kkut} %+Via:0 [ %+Sg:0 | %+Pl:0 ] > ViaVb ; !tp
+Trm+Sg:rnut TrmVb ; !tp
^C1 poss_case_ALL ;

Expand All @@ -129,34 +127,41 @@ LEXICON 2plposs
+Abs+Pl:si K_plur ; !tp
+Rel+Sg:ssi Krestr ; !tp
+Rel+Pl:ssi K_plur ; !tp
< %+Via:{ssigut} [ %+Sg | %+Pl ] > ViaVb ; !tp
< {ssigut} %+Via:0 [ %+Sg:0 | %+Pl:0 ] > ViaVb ; !tp
ssi^C2 poss_case_ALL ;


LEXICON case_3poss !both 3SgPoss + 3PlPoss
< %+Rel:{^Tta} [ %+Sg | %+Pl ] > Krestr ; ! 🛑CHECK Rel+Sg:^Tta | Rel+Pl:sa ^T inserted for 3PlPoss, will not have an effect on 3SgPoss (vowel)
< {^Tta} %+Rel:0 [ %+Sg:0 | %+Pl:0 ] > Krestr ; ! 🛑CHECK Rel+Sg:^Tta | Rel+Pl:sa ^T inserted for 3PlPoss, will not have an effect on 3SgPoss (vowel)
< %+Abs [ %+Sg | %+Pl ] > Krestr ;
< %+Via:{^Ttigut} [ %+Sg | %+Pl]> ViaVb ; !tp 🛑CHECK Rel+Sg:^Ttigut | Rel+Pl:sigut ^T inserted for 3PlPoss, will not have an effect on 3SgPoss (vowel)
@U.3SGPOSS.YES@+Via+Sg:@U.3SGPOSS.YES@gut ViaVb ; !tp 🛑CHECK if @U.3PLPOSS@ is blocked
poss_case_ALL ;
< {^Ttigut} %+Via:0 [ %+Sg:0 | %+Pl:0 ] > ViaVb ; !tp 🛑CHECK Rel+Sg:^Ttigut | Rel+Pl:sigut ^T inserted for 3PlPoss, will not have an effect on 3SgPoss (vowel)
@U.3SGPOSS.YES@ 3sgposs ;
@U.3SGPOSS.NO@ 3plposs ;

LEXICON 3sgposs
+Via+Sg:gut ViaVb ; !tp 🛑CHECK if @U.3PLPOSS@ is blocked
a poss_case_ALL ;
i poss_case_ALL ;

LEXICON 3plposs
at poss_case_ALL ;
i poss_case_ALL ; !actually "it", but doesn't matter here, original %POSSESSORTRUNC deprecated

LEXICON case_4poss
@U.4SGPOSS.YES@ 4sgposs ; !🛑 check if flag is working
@U.4SGPOSS.NO@ 4plposs ; !🛑


LEXICON 4sgposs
< %+Abs:{ni} [ %+Sg | %+Pl ] > Krestr ; !tp
< %+Rel:{mi} [ %+Sg | %+Pl ] > Krestr ; !tp regel r m i -> m i || k _ OBS: +Pl continuation was K_plur (in which only difference UNA->UKU - have a look at that 🛑)
< {ni} %+Abs:0 [ %+Sg:0 | %+Pl:0 ] > Krestr ; !tp
< {mi} %+Rel:0 [ %+Sg:0 | %+Pl:0 ] > Krestr ; !tp regel r m i -> m i || k _ OBS: +Pl continuation was K_plur (in which only difference UNA->UKU - have a look at that 🛑)
+Via+Sg:migut ViaVb ; !tp CHECK if: 4PlPoss: k + g -> kk 🛑
mi poss_case_ALL ;

LEXICON 4plposs
+Abs+Sg:rtik Krestr ; !tp
+Abs+Pl:tik K_plur ; !tp
< %+Aeq:{missut} [ %+Sg | %+Pl ] > AeqVb ; !tp
< %+Rel:{mik} [ %+Sg | %+Pl ] > K_plur ;
< %+Via:{mikkut} [ %+Sg | %+Pl ] > ViaVb ; !tp
< {missut} %+Aeq:0 [ %+Sg:0 | %+Pl:0 ] > AeqVb ; !tp
< {mik} %+Rel:0 [ %+Sg:0 | %+Pl:0 ] > K_plur ;
< {mikkut} %+Via:0 [ %+Sg:0 | %+Pl:0 ] > ViaVb ; !tp
mik poss_case_ALL ;

LEXICON poss_fusion
Expand All @@ -169,17 +174,17 @@ LEXICON poss_additive
LEXICON poss_vctrunc
+Abs+Sg+4SgPoss+Orth/Arch:%VCTRUNCi Krestr ; !tp NEEDS CHECKING: niaqi -> niaqqi ??, qisi ??

LEXICON poss_case_ALL !3SgPoss | 3PlPoss
< %+Abl:{nit} [ %+Sg | %+Pl ] > AblVb ;
< %+Abl:{niit} [ %+Sg | %+Pl ] > AblVb ;
< %+Abl:{ninngaanniit} [ %+Sg | %+Pl ] > Krestr ;
< %+Abl:{ninngarnit} [ %+Sg | %+Pl ] > Krestr ;
< %+Abl:{niik} [ %+Sg | %+Pl ] %+Err/Sub > # ;
< %+Abl:{ninngaanniik} [ %+Sg | %+Pl ] %+Err/Sub > # ;
< %+Aeq:{tut} [ %+Sg | %+Pl ] > AeqVb ; !tp !TJEK om t->s efter i Sg:t Pl:s, qisimisut, qisiisut, meqqumisut
< %+Ins:{nik} [ %+Sg | %+Pl ] > Krestr ;
< %+Lok:{ni} [ %+Sg | %+Pl ] > LokVb ;
< %+Trm:{nut} [ %+Sg | %+Pl ] > TrmVb ;
LEXICON poss_case_ALL
< {nit} %+Abl:0 [ %+Sg | %+Pl:0 ] > AblVb ;
< {niit} %+Abl:0 [ %+Sg:0 | %+Pl:0 ] > AblVb ;
< {ninngaanniit} %+Abl:0 [ %+Sg:0 | %+Pl:0 ] > Krestr ;
< {ninngarnit} %+Abl:0 [ %+Sg:0 | %+Pl:0 ] > Krestr ;
< {niik} %+Abl:0 [ %+Sg:0 | %+Pl:0 ] %+Err/Sub:0 > # ;
< {ninngaanniik} %+Abl:0 [ %+Sg:0 | %+Pl:0 ] %+Err/Sub:0 > # ;
< {tut} %+Aeq:0 [ %+Sg:0 | %+Pl:0 ] > AeqVb ; !tp !TJEK om t->s efter i Sg:t Pl:s, qisimisut, qisiisut, meqqumisut
< {nik} %+Ins:0 [ %+Sg:0 | %+Pl:0 ] > Krestr ;
< {ni} %+Lok:0 [ %+Sg:0 | %+Pl:0 ] > LokVb ;
< {nut} %+Trm:0 [ %+Sg:0 | %+Pl:0 ] > TrmVb ;

LEXICON case_number
@U.Num.Sg@ case_sg ;
Expand Down

0 comments on commit 9757fae

Please sign in to comment.