Morphotactic constraints with twol

From Apertium
Revision as of 17:46, 4 February 2017 by Francis Tyers (talk | contribs)
Jump to navigation Jump to search

This page describes how to use twol to implement morphotactic constraints. These are useful for modelling prefix and circumfix morphology.

Prefixes

Let's suppose you have a language like Avar, where the first part of the verb stem changes for gender, for example:

бицине "to speak"
бицуна neu-иц-aor it speaks
вицуна msc-иц-aor he speaks, I (m.) speak, you (m.) speak
йицуна fem-иц-aor she speaks, I (f.) speak, you (f.) speak
рицуна pl-иц-aor they speak

So, the obvious thing would be just to put all of the forms in the lexicon, like:


LEXICON AOR

%<aor%>:уна # ;

LEXICON Verbs

бицине%<v%>%<tv%>%<nt%>:биц AOR ;
бицине%<v%>%<tv%>%<m%>:виц AOR ;
бицине%<v%>%<tv%>%<f%>:йиц AOR ;
бицине%<v%>%<tv%>%<pl%>:риц AOR ;

But this is inefficient! What we would like to do is have a single lexicon for the gender prefixes,


LEXICON AOR

%<aor%>:уна # ;

LEXICON Prefixes

%<nt%>:б%> Verbs ;
%<m%>:в%> Verbs ;
%<f%>:й%> Verbs ;
%<pl%>:р%> Verbs ;

LEXICON Verbs

бицине%<v%>%<tv%>:иц AOR ; ! "говорить"

This is great, but we have a problem... The tag for our prefix is in the wrong place!

<nt>бицине<v><tv><aor>:б>ицуна
<m>бицине<v><tv><aor>:в>ицуна
<f>бицине<v><tv><aor>:й>ицуна
<pl>бицине<v><tv><aor>:р>ицуна

See also