Skip to content

Commit

Permalink
Added generation of morpheme boundary on both sides of the inflection…
Browse files Browse the repository at this point in the history
…al slot; fixed a typo in a rewrite rule; added simplification of immediately adjacent boundary markers of the same kind.
  • Loading branch information
aarppe committed Mar 6, 2024
1 parent c57315f commit 08affa2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/fst/verb_lexicon.xfscript.in
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ read regex [Stems PostverbalAffixes] .o.
MarkPrefixes .o.
InsInner .o. InsMiddle .o. InsOuter .o.
LInnerPrefixAllomorphs .o. RequireOuterAllomorphs .o.
"." -> "." InnerAffixes ,
"_" -> "_" MiddleAffixes ,
"=" -> "=" OuterAffixes;
"." -> "." InnerAffixes "@P.PREFIX.INNER@" ,
"_" -> "_" MiddleAffixes "@P.PREFIX.MIDDLE@" ,
"=" -> "=" OuterAffixes "@P.PREFIX.OUTER@" ;
define WordForms;

# Rewrite rule for resurrecting the prefix boundary markers
Expand All @@ -108,7 +108,8 @@ define ShowBoundaries [ "@P.PREFIX.INNER@" -> "." ,
"@P.PREFIX.OUTER@" -> "="
];

define SimplifyBoundaries regex [ "=" "_" "." -> "="
define SimplifyBoundaries [ [ "=" "=" -> "=" , "_" "_" -> "_" , "." "." -> "." ]
.o. "=" "_" "." -> "="
.o. "_" "." -> "_"
.o. "=" "_" -> "="
.o. [ "=" | "_" | "." ] -> 0 || .#. _
Expand Down

0 comments on commit 08affa2

Please sign in to comment.