SFST magyar főnevek POSS

A Programozás Wiki wikiből
%%%%%%%%%%%%%% ragposs.fst %%%%%%%%%%%%%%%%%%%
% http://wiki.prog.hu/wiki/SFST_magyar_főnevek_POSS
%%%%%%%%%%%%%% poss (tulajdonságjelző) for Hungarian (simplified first version)  %%%%%%%%%%%
% s1 om, em, öm, m
% s2 od, ed, öd, d
% s3 ja, je, a, e
% p1 unk, ünk, nk
% p2 etek, otok, ötök, tok, tek, tök
% p3 juk, jük, uk, ük
% examples
% kalapom, köröm, egerem, hájam, hajóm
%%%%%%%%%%%%%%% symbols %%%%%%%%%%%%%%%%%%%%
#cons# = bcdfghjklmnprstvwxyz
#vowel# = aeiouáéíówúöüőű
#magas# = eéiíöőüű
#magas1# = eéií
#mely# = aáouóú
#mely1# = ouóú
#oe# = öüőű
#aa# = aá
%%%%%%%%%%%%%%% vocal harmony - HU plural %%%%%%%%%%%%%%%%%%%%
ALPHABET = [#cons#] [#vowel#] <OEOE>:o <OEOE>:e <OEOE>:ö \
         <OEOE1>:o <OEOE1>:e <OEOE1>:ö <OEOE1>:<> \
          <J>:j <J>:<> <AE>:a <AE>:e <UUE>:u <UUE>:ü <UUE>:<> \
         <UUE1>:u <UUE2>:ü  <Noun>
$oeoe1$ =  ([#mely#] [#cons#]* <Noun> .*) <OEOE> <=>  o
$oeoe2$ = ([#magas1#] [#cons#]* <Noun> .*) <OEOE> <=>  e
$Del_pV$ = .*
$rp1$ = $oeoe1$ &  $oeoe2$ 
$oeoe11$ =  ([#mely#] [#cons#]+ <Noun> .*) <OEOE1> <=>  o
$oeoe12$ = ([#magas1#] [#cons#]+ <Noun> .*) <OEOE1> <=>  e
$oeoe13$ = ([#oe#] [#cons#]+ <Noun> .*) <OEOE1> <=>  ö
$rp2$ = $oeoe11$ &  $oeoe12$  & $oeoe13$
$j1$ =  ([#cons#]+ <Noun> .*) <J> <=>  <>
$rp3$ = $j1$
$ae1$ =  ([#mely#] [#cons#]* <Noun> .*) <AE> <=>  a
$rp4$ = $ae1$
$uue1$ =  ([#mely#] [#cons#]+ <Noun> .*) <UUE> <=>  u
$uue2$ =  ([#magas#] [#cons#]+ <Noun> .*) <UUE> <=>  ü
$rp5$ = $uue1$ & $uue2$
$uue11$ =  ([#mely#] [#cons#]+ <Noun> .*) <UUE1> <=>  u
$rp6$ = $uue11$

$rp$ = ($rp1$ & $rp2$ & $rp3$ & $rp4$ & $rp5$ & $rp6$ ) || $Del_pV$

% a to á and e to é if word ends with a or e
ALPHABET = [#cons#] [#vowel#] <Verb><Noun><Adj> <pl>
$a-to-aa$ = {a}:{á} ^-> (__ [<Noun>] .*)
$e-to-ee$ = {e}:{é} ^-> (__ [<Noun>] .*)
% delete pos tags
ALPHABET = [#cons#] [#vowel#] [<Verb><Noun><Adj>]:<>
$delete-POS$ =  .*

% <Noun> is needed to see the word''s end

$plu$ = <pl>:{<AA>k}

$nom$ =  <nom>:{}
$posss1$ =  {<posss1>}:{<OEOE1>m}
$posss2$ =  {<posss2>}:{<OEOE1>d}
$posss3$ =  {<posss3>}:{<J><AE>}
$possp1$ =  {<possp1>}:{<UUE>nk}
$possp2$ =  {<possp2>}:{<OEOE1>t<OEOE>k}
$possp3$ =  {<possp3>}:{<J><UUE1>k}
$posss1p$ =  {<posss1p>}:{<J><AE>im}
$posss2p$ =  {<posss2p>}:{<J><AE>id}
$posss3p$ =  {<posss3p>}:{<J><AE>i}
$possp1p$ =  {<possp1p>}:{<J><AE>ink}
$possp2p$ =  {<possp2p>}:{<J><AE>it<OEOE>k}
$possp3p$ =  {<possp3p>}:{<J><AE>ik}

$case$ = $nom$ | $posss1$ | $posss2$ | $posss3$ | $possp1$ | $possp2$ | $possp3$ |\
         $posss1p$ | $posss2p$ | $posss3p$ | $possp1p$ | $possp2p$ | $possp3p$
           
$PLU$ = $plu$

$CASEP$ = $case$


$morph$ = "noun-reg01.lex" <Noun>
$morph$ >> "morph6.a"
$morph$ = $morph$ $CASEP$
$morph$ >> "morph7.a"
$morph$ = $morph$ || $rp$
$morph$ >> "morph9.a"
$morph$ = $morph$|| $a-to-aa$ ||  $e-to-ee$ || $delete-POS$
$morph$

%%%%%%%%%%% noun-reg01.lex %%%%%%%%%%%
% vér
% szar
% szőr
% fa
% csere
%%%%%%%%%%%%%%%%% fst-generate ragposs.a

Lásd még[szerkesztés]