%% flap example from Karttunen 91

:- multifile macro/2.

:- ensure_loaded(twolevel).

%% oblig(Pairs,Trans,Left,Right)
%% opt(Pairs,Trans,Left,Right)
%% comp(Pairs,Trans,Left,Right)
%% twolevel(List) where List is a list of such rules

macro(flap,twolevel([vs,fl])).


%%%  <==> rules use "comp" ("composite")
%%%  comp(FeasiblePairs, TransducedString, LeftContext, RightContext)
%%%
%% 'A' represents th dipthong 'ay'
%% 'U' represents the dipthong 'uy'
macro(vs, comp(pairs, 'A':'U', [],   []  )).
%%% 
macro(fl, comp(pairs,  {t:'D', d:'D'}, [], []  )).

macro(pairs,{a..z,'E':'E','I':'I','U':'U', 'A':'A', 'A':'U', t:'D', d:'D'}).
macro(unvcd,{k,t: '?' ,p,s}).
macro(vowel,{a,e,i,o,u,'E','I','U','A': '?' }).
