next up previous
Next: Mohri & Sproat Replace Up: An Extendible Regular Expression Previous: Bibliography

Syllabification in Optimality Theory

This is the implementation of Karttunen's formalization of syllabification in Optimality Theory.

%% Karttunen's X -> L ... R. Every X is `bracketed' with L and R.
macro(dots(X,L,R), [[free(X), [[] x L, X, [] x R]]*, free(X)]).
%% Karttunen's A => L R. Every A must occur in context L _ R.
macro(restrict(A,L,R), ~[? *,A,~[R,? *]] & ~[~[? *,L],A,? *]).
macro(lbr,{'O[', 'D[', 'X[', 'N['}).
macro(parse,   dots(cons,{'O[','D[','X['},']') 
             o dots(vowel,{'N[','X['},']')).
macro(overparse,[([] x [lbr,']'])^,dots({cons,vowel},[],[lbr,']']^)]).
macro(onset,['O[', cons^, ']']).
macro(nucleus,['N[', vowel^, ']']).
macro(coda,['D[', cons^, ']']).
macro(unparsed,['X[', {cons,vowel}, ']']).
macro(syllable_structure,ignore([onset^,nucleus,coda^],unparsed)* ).
macro(gen, input o overparse o parse o syllable_structure).
macro(have_ons,restrict('N[', onset, [])).
%% 'parse' is used twice in Karttunen 98; we use parsed(N) where N is
%% the maximum number of occurrences of X
macro(parsed(N), free(N,'X[')).
macro(fillnuc, free(['N[', ']'])).
macro(fillons, free(['O[', ']'])).
:- op(403,yfx,lc).
macro(R lc C, lenient_composition(R,C)).
macro(syllabify,gen lc have_ons lc nocoda lc fillnuc lc parsed(0) lc 
        parsed(1) lc parsed(2) lc parsed(3) lc parsed(4) lc fillons ).