---
title: "A Two-Level Computer Formalism for the Analysis of Bantu"
description: "How SWATWOL analyzes Swahili words with two-level morphology, combining a lexicon of legal morpheme sequences with rules for spelling…"
canonical: "https://research.elamur.ai/free/en/papers/hurskainen-1992-two-level-computer-formalism-analysis/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/hurskainen-1992-two-level-computer-formalism-analysis/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [1992](https://md.research.elamur.ai/free/en/papers/1992/) / A Two-Level Computer Formalism for the Analysis of Bantu Morphology. An Application to Swahili

# A Two-Level Computer Formalism for the Analysis of Bantu Morphology. An Application to Swahili

Paper · 1992 · Arvi Hurskainen

**Authors:** Arvi Hurskainen · **Year:** 1992 · **Venue:** Nordic journal of African studies · **Licence:** No open licence stated (free-to-read copy; rights reserved) — text kept private

Nordic journal of African studies

- [PDF](https://njas.fi/njas/article/download/61/54)
- [DOI 10.53228/njas.v1i1.61](https://doi.org/10.53228/njas.v1i1.61)

## Summary

A Swahili verb can carry information about its subject, tense, object and relationship to another noun before the reader reaches the root. Suffixes after the root can add still more information. A program that analyzes such a word must recover those pieces, check that they can occur together and explain why they may look different from their dictionary forms. Arvi Hurskainen’s SWATWOL tackles this problem for Standard Swahili. It shows how a two-level approach previously used mainly for languages with suffix-based inflection can handle the prefix-heavy structure of a Bantu language. The task is to recover the grammatical structure of a written [word form](https://md.research.elamur.ai/free/en/concepts/word-form/), a problem in [morphology](https://md.research.elamur.ai/free/en/concepts/morphology/).

SWATWOL combines a lexicon organized as a network with rules that align an underlying string with its written realization. The network controls which morphemes, or meaningful grammatical pieces, can follow one another. A route can start with a series of prefixes, reach a root and continue through the suffixes that root allows. The rules constrain how the characters along such a route can appear in writing. They can require an underlying character to appear as a different letter or leave no visible trace, and they can consult evidence from both levels. The program examines words from left to right and returns the grammatical information stored along each successful route. When several routes fit the same spelling, the output can preserve several readings.

The lexicon was assembled from a scanned dictionary, lists of newer vocabulary and words recovered during development. The paper reports more than 25,000 lexical entries when derivation is included and describes the implementation as covering Standard Swahili inflection for the lexical material it contains. Tests on previously unused newspaper editorials, sports reports, linguistic writing and general prose yielded 609 unanalyzed forms out of a reported total of 19,669 (3.10%). The author classifies 36 (0.18% of the total) as forms the analyzer ought to cover. Names and foreign terms contributed to more failures in the newspaper material, while the general prose sample had the lowest reported rate of unanalyzed forms, at 0.52%.

These tests measure coverage and diagnose what the program leaves behind. The paper makes a separate case for the linguistic detail of the analyses through examples, including words with several plausible readings. It also identifies boundaries of the approach: productive derivation can generate grammatical forms that are uncommon in use, reduplication receives only selective lexical coverage, and recognizing an applicative suffix leaves open which role it plays in a sentence. The implementation’s main achievement is to bring the ordering of Swahili morphemes and their written alternations into one working analysis.

## Deep dive: A Two-Level Computer Formalism for the Analysis of Bantu Morphology. An Application to Swahili

How SWATWOL analyzes Swahili words with two-level morphology, combining a lexicon of legal morpheme sequences with rules for spelling changes. · about 36 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### A root can lie between two sources of grammatical information

A dictionary entry is a useful starting point for describing a word, but it gives only part of what an analyzer needs. A reader encounters an inflected or derived form, and the dictionary form may be embedded in it. In Swahili, the material before the root can identify the subject, locate the event in time, introduce a relative construction or identify the object. The material after the root can change the kind of event or the relationship between the verb and its participants. The paper calls attention to the combination of extensive prefixing inflection and suffixing derivation across Bantu languages. Swahili provides the implementation through which it investigates that combination.

The difference between inflection and derivation matters for the design. Inflection supplies grammatical information such as tense, person or number. Derivation builds a stem with a changed function or meaning and can itself create the basis for further derivation. A verb ending may therefore follow the root directly or follow a sequence of derivational pieces. On the other side, a prefix may be legal only along a particular inflectional route. The analyzer has to know both where to look for a root and how to use it once found. Finding a familiar string in the middle of the word establishes little on its own.

The paper situates this problem in a period of growing interest in computing for African-language research and teaching. It describes work in automatic translation, syntactic analysis, computational lexicology and reusable linguistic software. The practical questions nearer to its own task included processing time, memory and whether a program could handle words whose roots were missing from its lexicon. That last question mattered because a property that helps with a suffixing language may offer little leverage once a substantial part of the grammar lies on either side of the root.

Jäppinen and Ylilammi provide the example Hurskainen uses to make this point. Their parser works from right to left. For a word whose inflection is concentrated at its right edge, that direction gives the system a way to inspect the endings before reaching the potentially unknown lexical material. The paper accepts the advantage under those conditions. In the Bantu case it describes, traversing the word from either edge can bring the parser through affixes before it arrives at the central lexical material. Reversing direction therefore leaves the central problem of recognizing and constraining the intervening root. SWATWOL uses a left-to-right search through a lexicon built around the organization of Swahili words.

The role of the lexicon is correspondingly broader than that of a list of dictionary headwords. A root entry belongs where a compatible prefix route can reach it, and it carries information about the suffix routes that may follow. The author gives nouns and verbs different treatment because the relevant conditions differ. A noun root is generally associated with a class and its prefixes. A verb root can be shared by several inflectional routes, then direct processing towards the derivations available to that root. The design question is where to share structure and where to keep routes distinct so that sharing does not introduce unwanted combinations.

#### The alternative to ordered rewriting

Hurskainen adopts the general formalism and software originally designed by Kimmo Koskenniemi. The central distinction is between lexical representation, which captures the underlying string used by the grammar, and surface representation, which captures its written realization. A rule can inspect either representation when it decides whether a character pairing is possible. The relationship supports both analysis from writing to lexical structure and generation from a lexical string to writing.

The paper compares this arrangement with generative phonology, where a description can involve a sequence of ordered rewrite rules. A later rule in such a description can depend on the intermediate form created by an earlier rule. Hurskainen sees the ordering as a difficulty when one wants to account for analysis as well as generation. Two-level rules instead place parallel conditions on the same alignment. Where the writing omits part of a prefix, for example, a rule can refer to the character that survives on the lexical side even though it has no written counterpart.

Other two-level implementations give the paper a second point of comparison. Hurskainen describes the earlier work as concentrated on languages whose inflection and derivation relied primarily on suffixation. For those applications, a useful way to picture the lexicon is to place roots near the start and let routes branch into endings and possibly clitics, short grammatical forms that attach to another element. Swahili requires branching before root lookup, with some routes converging at the roots and branching again afterward. The general formalism provides the same ingredients, while the organization of the language changes how they are assembled.

The Swedish descriptions cited in the paper also illustrate a choice about what a two-level grammar should represent. Blåberg’s description uses 35 two-level rules and 13 morphophonemes, underlying units with context-dependent realizations. Karlsson’s more recent description uses eight rules. Hurskainen presents these as examples of different descriptive emphases. A grammar can expose relationships among forms through underlying symbols and rules, or it can make more of the permitted pieces explicit in the lexicon. These design examples frame the Swahili work. The paper does not use rule inventory size as a score for how accurately either Swedish analyzer works.

### The method, step by step

#### From a written word to an analysis

For a running example, consider `walichotusomea`, built on the root `som`, associated with reading. The paper divides the form into `wa`, `li`, `cho`, `tu`, `som`, `e` and `a`. The first part marks a plural subject in the M/WA noun class. The next indicates past tense. The relative prefix `cho` refers to a singular noun in the KI/VI class, and `tu` identifies a first-person plural object. After the root comes an applicative suffix, here adding the sense of doing the reading for someone. The final vowel completes the verb form. The pieces jointly express the idea of something that they read for us.

On this example the analyzer can return a sequence of labels that identifies the class and person of the subject, the tense, the class and number of the relative marker, the person and number of the object, the verb category and the applicative. The lexicon entry for the final vowel contributes no further label in this example. Hurskainen emphasizes that the output detail is a design choice. An entry can return a gloss or a grammatical feature, or it can remain silent. The route offers a way to assemble the analysis from local contributions even when the user-facing result does not display every segment.

A successful analysis has to satisfy two conditions. The program must be able to follow a continuous route through the sub-lexicons, starting at the word boundary and ending at a permitted termination. The proposed lexical characters must also align with the surface characters in a way all relevant rules allow. In a word such as `walichotusomea`, the sequence of prefixes constrains which continuations are available as the search advances. At a letter where a stem or affix has an alternation, the rules act on the proposed correspondence. When a route fails, the program can still return a reading from another route that fits the same spelling.

How SWATWOL analyzes a written Swahili word The steps in order.

These are responsibilities within the analysis, rather than separate passes over the word. In particular, lexicon traversal and comparison of lexical and surface characters go together as the program proceeds. The common processing component, called TWOL in the paper, takes lexical data and a set of transducers. A transducer here is a finite-state device that checks allowed sequences of correspondences. The rule compiler developed by Karttunen and colleagues translates a written rule into that form. SWATWOL supplies the Swahili-specific lexicon and rules to this common component.

#### How to read a two-level rule

Hurskainen presents the general rule in this form, with the correspondence under consideration followed by an operator and an environment.

```
CP op LC __ RC
```

`CP` is the correspondence pair, consisting of a lexical character and a surface character, or of a pairing specified more abstractly. `op` stands for the rule operator. `LC` is the context on the left and `RC` is the context on the right. The underscores locate the pair within the context. A rule can leave one side open. A colon within a pair such as `I:i` separates the lexical symbol `I` from the surface `i`. Where a context specifies only one side of the colon, it can inspect that side without imposing a particular character on the other.

The paper distinguishes context restriction, surface coercion and their combination. The Unicode arrows below represent the paper’s rule operators. A context restriction allows a pair only in the specified environment. Surface coercion requires that realization when the lexical character occurs in the environment. The combined operator makes the environment both the condition for permitting the pair and the condition that requires it. This distinction answers two separate questions that can arise in a grammar. One asks where a spelling is allowed. The other asks which spelling a position must take.

For many letters, the straightforward pairing is the character with itself. Capital letters on the lexical side can make an underlying symbol distinct from an ordinary letter, allowing the rules to refer to one while leaving the other alone. The paper gives `I:i` and `A:a` as default correspondences for symbols that can also vary, alongside `N:0` for a symbol whose default surface realization is empty. The zero is a position in the alignment. It does not appear as a printed numeral in the word. A lexical character that maps to zero can nevertheless help define the environment for another rule.

A compact example in the main discussion uses the lexical symbol `I` before a present-tense marker. In the display, the context includes a lexical slash whose written realization is empty.

```
I:0 ⇔ #: [n: | l: | z: | k:] _ /: :a
```

`I:0` pairs lexical `I` with no surface character. `⇔` is the combined restriction and coercion operator. `#:` checks for a lexical word boundary. The square brackets enclose alternatives and `|` separates them. `n:`, `l:`, `z:` and `k:` each refer to the lexical side of a consonant pair. The underscore locates `I:0`. To its right, `/:` checks for the lexical slash and `:a` checks for a surface `a`. A colon with an empty side leaves that side unspecified in the rule. The slash is an internal diacritic, a symbol that conveys information to the grammar without adding a written character.

The companion example uses `I` before the same marker and changes the context to the left.

```
I:y ⇔ #: (:V) _ /: :a
```

`I:y` pairs lexical `I` with surface `y`. `⇔` again requires the pair in its specified environment and restricts it to that environment in the example. `#:` is the lexical word boundary. `:V` asks for a member of the vowel set on the surface, and parentheses make that context position optional. The underscore marks the position of `I:y`, while `/:` and `:a` again specify the lexical slash and the surface `a` on the right. The rule can therefore match with the pair at the beginning of the word or after an initial surface vowel. A preceding consonant cannot satisfy this particular left context.

The subject-prefix example clarifies why the two levels are useful. The paper contrasts an alignment in which lexical `nI` has an audible and visible vowel with one in which `I` is absent from the written prefix. The lexical slash identifies the second grammatical environment. A rule based on adjacency to a surface `a` alone would see a context shared with other forms in which `I` does remain a vowel. By inspecting the slash, the analyzer can limit the alternation without changing the surface spelling. The main discussion uses these rules as compact explanations. The appendix lists broader versions of the rules, with several environments for the same pair.

#### Building the network and filling it with entries

Every search starts at `START`. Its possible continuations include `NORM` for the main vocabulary, `NUM` for numerals and `PROPN` for proper names. The ordinary vocabulary can be entered with or without the internal mark for an initial capital. The proper-name route uses that mark. `NORM` is a branch point rather than a spelling-bearing entry. It offers routes into `VERB`, `NOUN`, `ADPRON` and `KI`. The noun branch then directs the search toward routes for particular classes or toward routes for special and derived nouns.

A full lexical entry has three kinds of information. First comes the lexical string that the processor must be able to pair with the input. Then comes a continuation class, the name of a sub-lexicon or a group of possible sub-lexicons. Last comes the text that the entry contributes to the analysis. For example, the negative prefix `si` enters a route designated `P2n` and contributes the information that the verb is negative and first-person singular. Another negative prefix, `hu`, shares the continuation but carries second-person singular information in the example. Entries can thereby share what comes next while preserving their own grammatical identities.

Some entries serve only as links. A verb root may be able to take several derivational continuations, and several roots may need the same set. The paper shows how to give that set a short name and make the name a sub-lexicon whose entries are themselves the available routes. One example uses `Vd` to collect continuations for the applicative, causative, stative, passive and ending. Link entries of this kind consume no lexical characters and add no output labels. They let one entry name a group of alternatives without replicating the list of alternatives across roots.

Lexicon construction proceeded alongside grammar construction. Hurskainen first built and tried the network using a small lexical sample, extending it as more classes and continuations became necessary. Word roots were compiled after that structure was judged ready. Machine-readable Swahili dictionaries and word lists were unavailable at the start of the work. The author scanned *Kamusi ya Kiswahili Sanifu* and combined it with previously collected lists of recent vocabulary and other available lists. BETA programs used markers in those resources to extract entries into initial groupings. The resulting groups still needed refinement because a broad part of speech or noun class did not identify every continuation a root needed.

The dictionary supplied about 15.000 entries, and the compiled lists of newer vocabulary contained about 5000 entries each. Hurskainen kept each sub-lexicon alphabetized to help see duplicates and did not add another entry merely because an already listed item had an additional meaning. The paper reports about 19.000 simplex entries after this process, including 2.530 simplex verbal entries. Here *simplex* refers to an item counted before the productive derivations discussed in the implementation. Counting the effects of verbal derivation and noun formation from verbs raises the paper’s vocabulary figure to more than 25.000. The total depends partly on whether derived verbs are treated as separate words.

Earlier trials on books and newspapers supplied another route into the lexicon. SWATWOL extracted the unanalyzed items so that words absent from the dictionary and the newer lists could be examined. The paper reports that this procedure found several hundred additional words. That loop was resource development through examination of failures. The entries and constraints came from the dictionary materials, text and author’s linguistic decisions. The four test samples reported in the results were kept apart from this earlier cycle of using failures to correct the implementation.

#### How verbs reach the root and continue beyond it

The prefix side uses slots for possible material in a fixed relative order. The categories in the paper’s schematic include a negative prefix, subject prefix, tense or aspect, relative prefix and object prefix. Aspect marks how an event is viewed, for instance as completed. Some positions may be empty. More importantly, permission to use a particular prefix can depend on the choice made in another position. The present negative and the subjunctive, a form used in examples expressing such meanings as possibility, have their own routes because their prefix permissions differ from those of other forms.

Hurskainen groups alternatives for the same slot into sub-lexicons where the grammatical conditions permit grouping. Separate routes preserve distinctions among constructions until the search can safely converge. There are 22 sub-lexicons for verbal prefixes in the implementation. The root lexicon is a point of convergence, after which another network gives access to derivative stems and final vowels. That organization allows a root that occurs in several inflectional constructions to be looked up through those different constructions without creating a new full verb entry for each prefix sequence.

At the right edge, the grammar must allow more flexibility. The paper gives applicative, causative, stative, passive and reciprocal suffixes as examples. A causative can express causing someone to do what the base verb describes. A reciprocal can express participants doing something to one another. More than one derivational step can occur in the same verb, and some suffixes may recur. The paper identifies 13 formal derivational patterns and uses 97 sub-lexicons to implement the derivational network. The patterns concern allowable morphological combinations. They do not establish that a derived form has a predictable meaning.

The distinction becomes concrete in `onea`, a form related to `ona`, meaning ‘see’. In ordinary productive derivation an applicative entry can add a grammatical label to the interpretation of a root. The resulting assembly would identify a derivative of seeing, while the listed meaning at issue for `onea` is bullying. Hurskainen enters such a derived stem in the root lexicon so it can carry its own interpretation. He discusses a similar decision for `endelea`, associated with proceeding and formally related to `enda`, ‘go’, through a repeated applicative derivation. The grammar can in principle build the letter sequence by derivation. The separate stem entry responds to what the analysis should say about it.

Other irregularities concern the available pieces themselves. Some verbs of non-Bantu origin retain a vowel before a derivational suffix and take the ordinary final `A` after that suffix. The paper illustrates this with `rudi` and `rudisha`. The stored `i` travels with the stem. One continuation lets the base form end without adding a second vowel, while another sends the form into derivation and requires the final `A` there. This handles something specific to a group of lexical items without asking a general phonological rule to decide whether a vowel belongs to the stem.

The paper also shows a choice about the `l` that surfaces in derivations of `ka`, meaning ‘sit’. An underlying stem `kaL` gives the grammar a lexical position for the consonant, which can either surface as `l` or disappear. A route-based version stores `ka` and branches into one continuation that adds a final ending directly and another that supplies `l` before the permitted derivational material. Both descriptions can account for the visible forms under discussion. They differ in where the recurring consonant resides in the analysis and where the grammar records its conditions.

#### Short roots and noun classes

Monosyllabic verb stems pose a different routing problem. The paper describes a requirement for `ku` where the stress would otherwise fall on a morpheme that cannot bear it. Some tense and aspect markers and the relative prefixes fall into this category. The relevant items do not form a group that the author can pick out by a suitable shared phonological or morphological property in a rule. The small number of roots involved makes repeating the entries affordable.

SWATWOL consequently places the same monosyllabic roots in the sub-lexicons called `+kuR`, `-kuR` and `-kuRd`. The first route includes `ku` and leads directly to a verb-final vowel. Adding a derivational suffix there would remove the condition that the stem be monosyllabic. The route through `-kuR` is for an underived stem without `ku`, reached through the object-prefix lexicon in the arrangement described. The route through `-kuRd` leads to derivation and can be reached from tense or relative material. Different permissions follow the same roots because the route retains the relevant constructional distinction.

For nouns, grouping starts from the class prefix. A noun class determines which forms belong together for purposes such as singular and plural formation and which agreement markers associated words can carry. Hurskainen uses class names such as M/WA and KI/VI, drawn from characteristic prefixes. A path from the noun branch passes through the relevant prefix sub-lexicon to reach the matching roots. Some roots occur in multiple classes, sometimes with a change in meaning. Variation in plural formation and irregular prefix behavior lead to 20 sub-lexicons containing noun roots, beyond the eight that a simpler class-by-class arrangement would suggest.

Adjectives make it especially valuable to share routes. Inflecting adjectives can take class prefixes across the noun-class inventory, with their form keyed to the noun they qualify. Their prefixes do not undergo all the same alternations as noun prefixes, so the adjective routes use a dedicated prefix sub-lexicon. Adjectives that do not inflect take a separate path. The lexicon likewise distinguishes numerals that take prefixes from those that do not and assigns routes to possessives and other forms with their own distribution. In the closed class of demonstratives beginning with `h`, Hurskainen handles variation in the vowel through lexical organization. A phonological treatment of that small inventory would require three rules in the description he considers.

#### Connecting distant parts of a word

A continuation by itself remembers the next set of entries. Once several routes have converged at a large root lexicon, a suffix can be hard to restrict to just some of the routes that got there. The general relative suffix illustrates the problem. It follows the final vowel, and a form that uses it cannot also contain the tense or aspect marker or a relative prefix. A form with a relative prefix may instead allow tense marking. An analyzer needs a way to preserve this distinction across the intervening root and suffix material. Creating separate root copies for the purpose would be expensive given the size of the verb lexicon.

The paper describes a possible feature mechanism before explaining what SWATWOL actually uses. In the proposed arrangement, related entries would carry values for features such as `TENSE` and `RELP` in their output information. A present-tense `na` could contribute `TENSE=PR1`, while a general relative `ye` would contribute `TENSE=NIL`. `PR1` is a present-tense value and `NIL` requires the absence of that category. The values would conflict on a route that combined the entries. With a corresponding conflict for `RELP`, the same mechanism could reject co-occurring relative prefixes and suffixes. Entries that had no such feature for comparison would be unaffected. The paper presents this as a design possibility, and the reported implementation uses correspondence rules instead.

Those rules rely on invisible symbols on compatible routes. The pair for the general relative is as follows.

```
%+: ⇒ _ :* %&:
```

`%+` denotes the literal lexical `+` marker, with `%` distinguishing the literal symbol in the grammar notation. The colon leaves the surface side unspecified in this rule, and the marker is defined to have zero surface realization. `⇒` marks a context restriction. The underscore locates the `+` correspondence, and `:*` allows intervening correspondences on the way to `%&:`, the literal lexical `&` marker, also invisible on the surface. The rule therefore licenses the first marker only when the second can be found to its right.

```
%&: ⇒ %+: :* _
```

`%&:` is the lexical `&` marker, and `⇒` again imposes a context restriction. `%+:` requires a lexical `+` to its left, `:*` can span the intervening material, and the underscore is the position of `&`. Taken together, the rules require the marking for the general relative and the marking for a compatible earlier route to occur together in the indicated order. The two marks can be separated by the root and other material. Neither takes up a letter in the written output.

A related use of diacritics supports the final vowel of verbs. The lexical `A` can be written as `a`, `e` or `i`. Absence of a tense marker cannot by itself define the subjunctive environment for `e`, since other constructions also lack that marker. A diacritic on the lexical route supplies the needed distinction. Another marker is available for the present negative with final `i`. The context rule can see across the root to the appropriate mark. In effect the route identifies the grammatical construction, and the rule uses that information in checking the final vowel.

Hurskainen also uses two context restrictions to connect nominal derivation with the correct route through verbal roots. This process can combine a nominal prefix from class 1, 2 or 11 with a verbal base ending in `a` and a nominal suffix `ji`. A symbol on the earlier route and a symbol on the later route let the grammar check that the parts belong together. The paper says that handling this productive family through the grammar saves thousands of lines of lexical material and reduces memory requirements. It also acknowledges that the combinatory option permits some formations that are grammatical but uncommon.

#### Choosing what to express with rules

The noun class N/N offers a detailed example of what an underlying representation buys. The author uses lexical `NI` to account for surface `n`, `m`, `ny` and a prefix with no visible letters. In `ndege`, lexical `N` corresponds to `n` and `I` disappears. In `mbegu`, the first symbol corresponds to `m` and the second again disappears. In `nyumba`, the symbols correspond to `n` and `y` before the vowel of the root. In `taa`, both symbols are absent from the surface prefix. The reference to `NI` as a historical form supports the choice, and its immediate function is to give a constant lexical prefix to forms with different spellings.

The `taa` alignment shows how parallel rules differ from a series of replacements. One condition checks the realization of `I`, and another accounts for the surface realization of `N`. Both see the same alignment. An ordered explanation could describe losing the underlying vowel and then dropping the nasal in the resulting environment. In the two-level program, neither pairing needs to wait for an intermediate string from a previous rewrite. The upper-case symbols also distinguish these positions from ordinary written `i` or `n` elsewhere in the word.

Hurskainen reserves a separate route with a zero prefix for newer nouns assigned to N/N whose forms give little reason to posit an underlying `NI`. Many are loans. Their class membership supplies information that the analyzer may need to return, while an abstract prefix that never shows up on the relevant root would make the lexical account less transparent. Thus the paper’s use of historical evidence for one set of entries leaves room for a more direct analysis of another set in the same class.

The KI/VI singular prefix includes an alternation that illustrates the character-by-character constraint. For the lexical `kI` to give surface `ch`, `k` aligns with `c` and `I` with `h`. The appendix expresses the two parts of the affricate by complementary rules.

```
k:c ⇔ [#: | %*:] _ I: :Vi
```

`k:c` maps lexical `k` to surface `c`, and `⇔` applies the combined context restriction and surface coercion. The brackets describe alternatives, with `|` meaning ‘or’. `#:` checks for the lexical boundary, while `%*:` checks the literal capitalization mark on the lexical side. The underscore locates the current pair. `I:` checks for lexical `I` to its right, and `:Vi` asks for a surface member of the designated vowel subset `Vi` after it. Each colon separates lexical from surface information, with an empty side left open by the condition.

```
I:h ⇔ [#: | %*:] k: _ :Vi
```

`I:h` pairs lexical `I` with surface `h`. `⇔` again makes the context necessary and sufficient for this pairing under the rule. `#:` and `%*:` offer the boundary and capitalization-mark alternatives, separated by `|` within brackets. `k:` requires a lexical `k` immediately before the position of `I:h`, marked with the underscore. `:Vi` specifies a vowel from the same surface set on its right. These two rules describe a single spelling outcome by constraining adjacent pairs. The corresponding plural alternation gives `vy` from lexical `vI` where the relevant rule and route allow it.

The appendix gives the implementation 18 rules. Hurskainen describes three as partial rules. Besides the paired treatment of `ch`, the inventory handles vowel loss, vowel-to-glide alternations, changes conditioned by stem vowels in derived verbs, nasal prefix realization, and the change of root-initial `r` or `l` to `d` in the relevant noun class. The inventory also includes the paired restrictions for the general relative and noun derivation. A definition of a vowel or consonant set keeps such rules readable. Separate lexical symbols limit each rule to the affix or class of cases where it belongs.

### Experiments and results

#### What the four samples test

The test set spans different styles of Swahili and different demands on the lexicon. MZAL contains leading articles from the weekly newspaper *MZALENDO*. CHEZO contains sports reporting from the same paper. ISIM consists of linguistic writing from a conference publication of the Institute of Kiswahili Research. BIN contains prose from Julius K. Nyerere’s *Binadamu na Maendeleo*. The author says that these samples had not been used in the cycle of testing and correcting the program. The comparison thus exercises the same analyzer on unfamiliar material, including styles whose vocabulary and incidence of names differ.

Analysis started with preparation by the BETA program `PREPROC.SWA`. An ordinary initial capital became a lower-case letter preceded by an asterisk. The preprocessor moved punctuation away from words while retaining periods belonging to abbreviations such as `k.mf.`. It also rejoined words divided by a hyphen across lines. Paragraph boundaries were expected to carry an `@` in the input. These conventions define the condition under which the reported analysis was run, including how the system could distinguish a capitalization signal from the letters that follow it.

The program treated capitalization in headings differently from upper-case abbreviations. A word in an upper-case heading could be lowered and receive the ordinary initial mark. An abbreviation such as `TAZARA` was represented with a mark before each lower-case letter, so the lexical entry could recognize the abbreviation as conventionally capitalized throughout. The paper describes handling mixed-case anomalies as well. The preprocessed samples were then converted into lists with one word per line. The outcome being counted was whether the analyzer returned an analysis for the prepared form.

The author inspected failures and assigned them to groups. One group contains spelling errors. Another includes uncommon Swahili items outside the intended lexicon, foreign material and names that were absent. The last contains forms the author judged ought to be covered. The difference is important for reading the results. A zero-analysis item is easy to count. Deciding whether that item shows a gap in general Swahili vocabulary, a deliberately limited proper-name inventory or a defect in the source text requires a further judgment.

#### How often forms received no analysis

MZAL is reported to contain 5670 word form types, with 196 unanalyzed forms. The paper gives 3.5% as the rate of forms unanalyzed in this sample. The group counts for the failures are 36 misspellings, 132 in the rare or outside-vocabulary group and 28 judged appropriate for coverage. Hurskainen attributes much of the residue to personal and place names. Among items judged worth including, the paper points to a form based on `wekez` and to `vitega`. Those examples illustrate how an analyzer can expose usages absent from the dictionary material that supplied its entries.

CHEZO is reported to contain 4943 word form types and 306 unanalyzed forms, or 6.2% of the sample. The failure counts are 35 misspellings, 265 in the group containing rare and foreign items and 6 judged to belong in the lexicon. Sports reports mention teams and players with names from several languages and include English sports terminology. The author judges much of that material outside the scope of the lexicon. In this sample the largest raw failure rate goes with an especially large group of items whose inclusion is treated as a matter of scope.

The linguistic writing in ISIM has 4028 reported words, of which 81 were unanalyzed, for a rate of 2%. The paper lists 35 misspellings, 45 rare items, largely names and foreign forms, and 1 item judged to belong in the lexicon, `kujibizana`. BIN is reported to have 5028 word form types and 26 unanalyzed forms, a rate of 0.52%. The groups there contain 23 misspellings, 2 rare items and 1 form judged appropriate for inclusion. The paper associates the spelling errors in BIN with insufficient editing after scanning.

Share of forms left unanalyzed by SWATWOL in the four Swahili test samples General prose had the smallest share of unanalyzed forms, and sports reports had the largest.

**The numbers**

| System or setting | Unanalyzed forms % |
| --- | --- |
| BIN general prose (this paper) | 0.52 |
| ISIM linguistic writing | 2 |
| MZAL newspaper editorials | 3.5 |
| CHEZO sports reports | 6.2 |

The paper’s pooled breakdown reports 19,669 word forms and 609 unanalyzed forms (3.10%). Of the pooled total, it lists 129 as misspellings (0.66%), 444 as rare or otherwise outside the intended lexicon (2.26%) and 36 as forms that ought to be included (0.18%). Those are the published aggregate figures. The overall rate concerns all forms that produced no reading, while the final category captures the author’s narrower diagnostic of omissions. Both figures are useful because the ability to process what a document contains and the coverage of an intended vocabulary answer different questions.

#### What the comparative figures establish

The paper reports recall above 99.8% in average prose before additions prompted by the tests and places it beside the reported 99.7% recall of SWETWOL, Karlsson’s analyzer for Swedish. The Swahili claim should be read alongside the explicit classification of failures. It concerns the analyzer’s coverage under the paper’s judgments about which forms it ought to recognize. The percentages in the chart are the broader unanalyzed rates on the named samples. SWETWOL supplies a point of reference from another application of the formalism. The two analyzers were evaluated on different languages and the comparison does not report a shared test or common annotation procedure.

There is no competing Swahili analyzer run on these texts in the paper. The empirical comparison is across genres with SWATWOL held fixed. The analysis examples supply a second kind of evidence about the program’s output. For `aliyekwishatusomesha`, the appendix displays a reading that identifies the subject and relative information, past marking, a completive element, the object and the causative derivation. The example joins a complex prefix sequence to the same reading root used earlier. It shows how much grammatical material can be recovered from one spelling when the right routes and correspondences are available.

A shorter spelling can yield more readings. The appendix shows `taa` with an uninflected adjectival reading and with noun readings. `zile` can be interpreted as a demonstrative or as several verbal readings, and `zote` has readings associated with different classes. These outputs explain an important feature of the evaluation. A form that receives any analysis leaves the unanalyzed list. The resulting coverage figure does not tell how many of its readings are appropriate in the sentence. The examples make that distinction observable without supplying a separate score for contextual selection.

### What the ablations show

The paper reports no component ablation or controlled rerun with a modified grammar. Its analyses instead compare kinds of failures across samples, inspect particular word forms, and work through alternative ways to place the same linguistic information in rules or sub-lexicons.

#### The vocabulary changes with the writing

The most direct empirical contrast is between the genres. CHEZO and MZAL draw on the same newspaper, but the sports reports present a greater challenge to this lexicon. The large group of sports failures involving names and foreign vocabulary helps locate the source of the difference. The implementation’s coverage of ordinary grammatical combinations may be good while its treatment of a particular document still depends on whether that document uses names and technical expressions represented in the analyzer. With BIN, the failure analysis instead points mainly to spelling problems in the scanned text.

The division into failure groups matters even within the newspaper material. The editorials have fewer raw misses than the sports reports, while the paper assigns more editorial misses to the group it thinks the lexicon ought to cover. This comparison clarifies the diagnostic value of reading the unrecognized strings after measuring their frequency. A category full of unfamiliar players’ names would lead to a different conclusion about the lexicon from a category full of ordinary derivations missing from the dictionary. The classifications are an authorial analysis of the samples, and the paper offers no intervention that tests how a particular addition would change the four results.

#### What alternative descriptions buy

The sharpest comparison within the grammar concerns the KI/VI prefix. The paper reports 24 vowel-initial noun roots with an altered prefix and 134 vowel-initial roots that retain `ki` or `vi`. These counts defeat a description that makes a following vowel sufficient for predicting the spelling across the lexicon. One possible treatment would group the roots that take the changed forms and connect them directly to `ch` or `vy`. That would encode the attested combinations economically. Hurskainen wants the analysis to preserve the underlying relationship among the prefix forms, so he instead combines the alternation rules with lexical routes that protect the invariant cases.

That choice shows how exception handling can coexist with a general alternation. The rule vocabulary includes the special lexical symbols `kI` and `vI` where alternation is intended. An invariant route can use lexical `ki` and `vi`, where the rules for capital `I` have no effect. The difference between the two analyses lives in the lexicon while the surface behavior of the alternating group remains stated in rules. The paper demonstrates the descriptive consequence of this design. It does not measure a gain in coverage from the hybrid treatment over the route-only alternative.

For N/N and for agreement on adjectives, a different balance is attractive. The `NI` analysis allows several observable prefix shapes to arise from a common underlying representation. This avoids organizing roots into separate groups solely by the written shape of that prefix. Inflecting adjectives can combine with many class prefixes, so listing all equivalent surface combinations would multiply routes through the same adjectives. At the other end, the author treats the exceptional `kw` of `kwenda` and `kwisha` by sending the `kw` prefix directly to just those roots. A narrowly distributed exception gives little reason to write a general rule. These examples show how the expected scope of a pattern affects where it is represented.

The short-root example offers a further comparison. Repeating a small set of monosyllabic roots is manageable and keeps the legitimate `ku` combinations explicit. Repeating the much larger verb root lexicon simply to prevent tense marking with a final relative would be costly. Invisible markers and context restrictions let that larger set be shared. In both cases earlier material constrains later material. The differences are the sizes of the affected root sets and the extent to which the permitted combinations can be stated directly as continuations.

The paper proposes feature matching as another possible treatment of long-distance compatibility. Because the mechanism was not used in the reported SWATWOL system, it has no measured coverage or runtime beside the rules that were used. The contrast is still precise enough to show where each method puts the obligation. Feature matching would register incompatible values contributed by entries. The actual rules carry the obligation in aligned lexical markers and use the rule component to enforce co-occurrence. The test figures concern the latter arrangement.

### Limitations

#### Limits the author identifies

The paper ties coverage to the vocabulary entered in the lexicon. A grammatical form may have no analysis if its underlying lexical item is absent. This affects newspaper writing in particular. The paper gives the proper-name inventory as 1.300 names plus 500 derived names and suggests broadening it. It also treats some foreign terms and names as outside what the general lexicon ought to include. The intended lexical scope therefore helps determine which failures count against the author’s claim about ordinary Standard Swahili.

Reduplication remains an explicit gap. Reduplication builds a form by repeating linguistic material. SWATWOL covers commonly encountered reduplicated forms by listing them individually. Hurskainen expects some prose samples to contain many failures of this kind and sees a danger in allowing unrestricted combination: a broadly productive rule could license forms that speakers do not use. The paper identifies the need for a more discriminating description. Its decision to list known forms gives the system a clear set of accepted cases at the cost of coverage for unlisted combinations.

Productive derivation has a related limit. The author cites insufficient knowledge about which verb roots support which combinations, and he leaves open the possibility that further research and experimental material could simplify the network of derivational routes. Nominal derivation with `ji` illustrates a choice already made in the grammar. The general mechanism permits some formations that the paper regards as grammatical but uncommon. The author values the resulting savings in lexical storage, so the implemented system has a broader generative reach than the set of derivatives commonly encountered in text.

A deeper limit appears at the boundary with syntax. The paper discusses the applicative suffix, whose possible interpretations include a beneficiary, instrument, goal, place, reason, time or manner. The program can recognize the suffix and name the derivation. Determining which of those roles is expressed may depend on the rest of the sentence. The lexical slot problem and the interpretation problem are distinct. A richer lexicon can improve which morphologically possible forms are returned, while deciding among syntactic and semantic readings needs evidence outside the word.

#### Limits visible in the evaluation

The evaluation provides a count and classification of unrecognized forms. It does not provide a manually checked inventory of analyses for all recognized items, measure whether the correct reading is among the output alternatives for each token, or report whether a selected analysis fits its sentence. The article’s examples of multiple readings make that missing measurement consequential. An analyzer may return more readings than a particular passage warrants, and the unanalyzed count would register a success for the form. The abstract’s claim about very high precision therefore receives a qualitative showing through examples and grammatical design, alongside quantitative evidence focused on coverage.

There are also limits to the resolution of the numerical report. The descriptions of the samples alternate between word form types and words, and the failure discussion sometimes explicitly mentions tokens and distinct forms. Some of the printed within-sample category percentages do not reconcile with the accompanying counts. The pooled figures and the headline sample rates can be reported as the paper gives them. They cannot support a uniform reconstruction of type-level versus token-level performance or fine comparisons based on the printed category percentages.

The held-out description establishes that the program had not used these four samples for correction. The samples still represent a particular mix of publications and preparation conditions. The paper offers no separate sweep over the effects of capitalization processing, punctuation handling or scanning errors and reports no comparable runtime or memory benchmark for the alternatives it discusses. The claim about smaller lexical storage for productive noun derivation gives a reason for that design. The amount of time or memory saved across complete analysis runs remains unmeasured in the report.

Some rule illustrations also need care when read as an implementation specification. The main discussion associates the subjunctive and present negative examples with diacritics whose roles appear reversed in the corresponding final-vowel rules printed in the appendix. The common mechanism is clear: an invisible lexical mark conditions the surface vowel. The exact assignment of those two literal symbols cannot be recovered unambiguously from the conflicting displays alone. That distinction matters for reproducing the written specification, even though the examples explain the linguistic purpose of the markers.

Finally, the implementation is for Standard Swahili. The paper argues for the applicability of the formalism to Bantu languages on the strength of the word structures and alternations it analyzes. It does not evaluate other Bantu languages or measure coverage across Swahili varieties. The demonstration establishes that the two-level approach can accommodate extensive prefixation, central roots and productive suffixation in this implementation. How much of the lexicon and rule organization transfers would depend on the constructions in the language being described.

### What came after

The paper documents several uses already under way and sketches directions that still required further development. It records no later studies establishing how those directions turned out. The clearest implemented extension was a dictionary-specific version of SWATWOL restricted to the entries of *Kamusi ya Kiswahili Sanifu*. Applied to running text, it identified forms that the dictionary-based analyzer could not read and extracted them with surrounding context. An editor could inspect a candidate along with evidence of how it was used. Hurskainen reports that this version was being used to find material for the dictionary’s second edition, an application to [lexicography](https://md.research.elamur.ai/free/en/concepts/lexicography/).

The SWATWOL implementation was also being used to tag the DAHE corpus, which the paper describes as containing 1 million words of Standard Swahili text. Tagging here adds grammatical information to the written material. Hurskainen also proposes analyzing ordinary untagged text before a search. A query could then draw on the recovered lexical or grammatical representation of a form, rather than depend on a match to its exact written appearance. The paper describes the intended use for finding passages but gives no comparative search results. These applications connect morphological analysis with [linguistic annotation](https://md.research.elamur.ai/free/en/concepts/annotation/) and [information retrieval](https://md.research.elamur.ai/free/en/topics/information-retrieval/).

The sentence-level direction takes the ambiguity visible in the appendix as an input to further processing. Hurskainen proposes using SWATWOL as the morphological component of a system based on Karlsson’s Constraint Grammar Parser. The analyzer supplies the candidate readings from its word-level grammar. The proposed next stage would use sentence information to disambiguate the readings, determine clause boundaries and analyze surface syntax. The paper presents that division of work as a goal for [parsing](https://md.research.elamur.ai/free/en/concepts/parsing/).

A more limited extension to multiword strings had already been implemented in examples. The author describes connecting the words of a noun phrase with underscores and representing those connections in the lexicon. A route could enforce agreement and allow the orders of a noun and its qualifiers that the description recognizes. For instance, the demonstrative `yule` can follow the adjective or precede it in the paper’s examples with `mtoto`, `wangu` and `mzuri`, provided the earlier parts are in the appropriate order. The author associates the latter order with emphasis on the demonstrative. This extension uses continuations between whole words in much the same way as continuations between morphemes inside a word. It shows what can be checked within a designed phrase inventory.

Teaching is another direction the paper connects to that phrase work. An analyzer can check a complex verb supplied by a learner, and a phrase description can give feedback on noun-class agreement and word order. Hurskainen also reports creating English–Swahili and Finnish–Swahili dictionaries within the lexical system so learners could look up roots during such exercises. He distinguishes generation from an explicit lexical string, which TWOL already supports, from generation from grammatical instructions, which requires an additional component. His example of the latter starts from instructions for a first-person singular subject, present marking, a KI object and the reading verb, yielding `ninakisoma`.

Spell checking and quick dictionary lookup round out the uses the author discusses. A spell-checking version can use the success or failure of word recognition with the detailed grammatical output suppressed. A dictionary version can expose the root and structural analysis beside a translation or gloss. The practical reach of each proposal follows from the information the system actually recovers from a word. Dictionary work can inspect failures in context, a corpus can retain candidate analyses, and a sentence parser can use those candidates to investigate the agreement and interpretation that the word alone leaves open.

## Cite

Cite as Arvi Hurskainen. 1992. A Two-Level Computer Formalism for the Analysis of Bantu Morphology. An Application to Swahili. Nordic journal of African studies.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.53228/njas.v1i1.61](https://doi.org/10.53228/njas.v1i1.61)

```bibtex
@article{hurskainen1992two,
  title = {{A Two-Level Computer Formalism for the Analysis of Bantu Morphology. An Application to Swahili}},
  author = {Arvi Hurskainen},
  journal = {Nordic journal of African studies},
  year = {1992},
  doi = {10.53228/njas.v1i1.61},
  url = {https://doi.org/10.53228/njas.v1i1.61}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
