Constraints on allomorphs - adamb924/mortal-engine GitHub Wiki

Motivation

It is generally not the case that you would want more than one allomorph to match in a parsing. (You would want that if there was free variation, but not otherwise.) Instead, you want to be able to specify that this allomorph occurs in these contexts, and that allomorph occurs in other contexts. (This is said somewhat more fully here.)

These constraints are placed in the <allomorph> tag, above the <form> tags. Here is an example of what that looks like:

<morpheme label="Classifier">
    <allomorph>
        <phonological-condition type="following">
             <match-expression lang="wk-LA">.*[ieo]</match-expression>
        </phonological-condition>
        <form lang="wk-LA">e</form>
    </allomorph>
    <allomorph>
        <phonological-condition type="following">
             <match-expression lang="wk-LA">.*[ɪɛɔ]</match-expression>
        </phonological-condition>
        <form lang="wk-LA">ɛ</form>
    </allomorph>
</morpheme>

(See here for a full explanation.)

In this example, each <allomorph> has a <phonological-condition> constraint that has to be satisfied for the allomorph to match.

There can be any number of constraints. If any of the constraints is not satisfied, the allomorph will not match. (Put differently, for an allomorph to match, it needs to match with respect both to its segments and to its constraints.)

(All this talk of satisfying constraints has nothing to do with Optimality Theory, by the way.)

Available constraints

Making life easier

Because languages tend to reuse the same phonological environments over again, it is helpful to have a shared constraints that you can reuse within your morphology file. This saves a lot of copy/paste work, and it makes your code more readable.

Along that same line, you can also generate your allomorphs algorithmically with the <create-allomorphs> tag.

Constraints on morphemes

Constraints that have to do with allomorphy should go in <allomorph> tags, but if you have constraints that apply to entire morphemes—presumably this would something to do with morphosyntax—they can be placed in the <morpheme> tag:

<morpheme label="Classifier">
    <tag-match scope="any-following" type="all">
        <match-tag>present-tense</match-tag>
    </tag-match>
    <allomorph>
        <phonological-condition type="following">
             <match-expression lang="wk-LA">.*[ieo]</match-expression>
        </phonological-condition>
        <form lang="wk-LA">e</form>
    </allomorph>
    <allomorph>
        <phonological-condition type="following">
             <match-expression lang="wk-LA">.*[ɪɛɔ]</match-expression>
        </phonological-condition>
        <form lang="wk-LA">ɛ</form>
    </allomorph>
</morpheme>

(Under the hood: This is just a shorthand notation. Mortal Engine will add all of the morpheme-level constraints to each allomorph.)

⚠️ **GitHub.com Fallback** ⚠️