SFST magyar számnevek

A Programozás Wiki wikiből
%%%%%%%%%%%%%%% szn1.fst %%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%   Hungarian numerals %%%%%%%%%%%%%%5
#cons# = bcdfghjklmnprstvwxyz
#vowel# = aeiouáéíóúöüőű
#magas# = eéiíöőüű
#mely# = aáouóú
%%%%%%%%%%%%%%% phonetic rules %%%%%%%%%%%%%%%%%%%%
ALPHABET = [#cons#] [#vowel#] 
          

ALPHABET = [#cons#] [#vowel#] [<leg> <legesleg> <Adj><ground> <comp> <superl> <exagg><bw>]:<>
$delete-POS$ =  .*

%%%% inflection of numerals %%%%%%%%%%%%
$ground$ =  <ground>:{} 
$mul$   =  <mul>:{sz<OEO>r} % szor, szer, ször
$ser$ =  <ser>:{<OEO>dik} % odik, edik, ödik 
$part$  =  <part>:{<OEO>d}  % od, ad, ed, öd

% Also tem (kor) and sup (on, en, ön) cases are used in numerals

$pcase$ = $mul$ | $ser$ | $part$ 
$plcase$ = $pcase$

$morph$ =  "szn-reg.lex" <Num>  %  read in
$morph$ >> "morph1.a"
$morph$ = $morph$ $plcase$
$morph$ >> "morph2.a"
$morph$ = $morph$ ||  $delete-POS$ % add prefixes, clean up
$morph$

%%%%%%%%%%% szn-reg.lex %%%%%%%%%%%
% egy
% öt
%%%%%%%%%%%% sample result %%%%%%%%
% ötször, ötödik, ötöd, tizenöt, ötkor

Lásd még[szerkesztés]