Elamur Research

Finite State Morphology Tool for Latvian

Paper · 2013 · Daiga Deksne

Summary

A Latvian word can change its ending and its stem as its grammatical role changes. The ending alone can leave several interpretations open, and some forms of a verb use a stem that differs substantially from the one found in its dictionary entry. Daiga Deksne’s paper describes a tool for handling these patterns in both directions. Given a written word form, it returns possible dictionary forms, or lemmas, with grammatical descriptions. Given a lemma and a description, it generates the matching form or forms. It can also list a lemma’s full inflectional paradigm, the set of its forms with their grammatical descriptions. The work addresses a practical problem in Latvian morphology. The earlier analyzer was slow on large collections of text, its lexical database was difficult to extend, and the analyzer ran only on Windows.

The new tool uses finite-state transducers, which relate sequences of symbols on two sides of a representation. The system can use the same lexical relationship to connect a written form to its analysis or to construct a form from an analysis. Its lexical description gives nouns, adjectives, and verbs reusable ending groups, then records which stems can take the endings in each group. Tags on the parts of a word let the system filter out combinations that disagree. Editors can enter the stems for a word together in a dedicated file, and a script supplies the notation needed by the transducers. Other word classes, including pronouns and numerals, are represented through explicitly listed forms and their associated lemmas.

On 37,964 entries from the Latvian side of a Latvian–English dictionary, the older analyzer processed 316 words per second on Windows. The finite-state tool processed 9491 words per second in the same test, and the paper reports similar speed for the new tool on an Ubuntu GNU/Linux computer. A second test analyzed the same entries, then used the resulting lemmas and parts of speech to request full paradigms. That workflow took 7 minutes and 25 seconds with the older tool and 27 seconds with the new one. The timings measure the implementations on those tasks. The paper also reports minor output differences associated with lexical corrections, and it identifies two areas for further work: generating predictable stem alternations and extending coverage through compounding rules.

Deep dive: Finite State Morphology Tool for Latvian

Daiga Deksne’s paper explains how finite-state transducers analyze and generate Latvian word forms and compares their speed with an earlier tool. · about 31 minutes to read

The problem and its context

What an ending can tell you

A morphological analyzer starts with the spelling encountered in text. For Latvian, part of the job is to work back from that spelling to a dictionary entry. Another part is to describe what grammatical form of that entry the spelling could represent. These are distinct questions. Several grammatical descriptions can lead to the same spelling, even when the dictionary entry is clear. A useful analysis therefore has to preserve the possibilities that the lexicon and the inflectional system allow.

The paper makes this visible with piecu, a form of the numeral whose lemma is pieci. In isolation, piecu can have a masculine plural genitive reading or a feminine plural genitive reading. The spelling stays the same across those interpretations. A description that identified the numeral and supplied its case but dropped the distinction in gender would lose information about the two grammatical possibilities. An analysis that returned just one of the possibilities would make a choice the spelling cannot support by itself. The tool’s interface accommodates ambiguity by returning multiple tagged analyses when the written form warrants them.

A second difficulty is deciding which stem a written word contains. Much of Latvian inflection can be described by attaching material to a stem, but the stem itself can vary across the forms of a word. The paper distinguishes regular changes in stem-final consonants from cases in which a form uses a substantially different stem. It gives the first verb conjugation as an example in which the full paradigm draws on an infinitive stem, a present stem, and a past stem. Having a record for a lemma is therefore only part of lexical coverage. The system also needs the stems that realize its different forms and a description of the circumstances in which each stem can occur.

This matters in the reverse direction as well. A request for a form specifies a lemma and grammatical features. The generator must find a compatible ending and, where the word has several stems, use the appropriate one. A request for a full paradigm widens the task. It asks the tool to retrieve the valid combinations for the entry and to retain the descriptions that distinguish forms with identical spellings. A representation that keeps links among stems, endings, and grammatical forms can support all of these operations.

What the earlier analyzer already encoded

The earlier Latvian analyzer relied on a relational database for the contemporary language. It stored prefixes, stems, and endings in separate tables. Pre-defined groups classified these pieces, and relations among the tables specified which combinations were allowed. The analyzer used the database after it had been compiled into a proprietary format. The same database also supplied data for a Latvian spelling checker.

The earlier system thus already embodied an important linguistic distinction. A catalog of stems and affixes says which pieces exist. A representation of their relationships says which pieces can occur together. Merely joining each stem to each ending would admit sequences that belong to different inflectional classes. Replacing the analyzer still required a way to carry the restrictions into the new implementation. It also required a way to represent the possible internal differences among stems of a single entry.

The paper identifies three practical reasons to replace the earlier analyzer. Processing large collections of text was slow. Adding a lexical entry was complicated. The analyzer was also confined to Windows. These problems affect different parts of the work. Speed matters when a tool is called for each word in a collection. Ease of editing matters when a lexicon needs new entries or corrections. Platform support matters when the same component is to be used in a different operating environment. The paper treats them together because the choice of how to describe, compile, and run the lexicon bears on all three.

The earlier database is also a source of continuity. The paper retains its identifiers for grammatical forms while describing the finite-state lexicon. The new design can therefore use an existing category inventory internally while offering more descriptive tags at its interface. The change in architecture concerns the way lexical material and its restrictions are assembled and made available to applications. Much of the linguistic information needed by that architecture was already organized in the earlier resource.

The precedent for building words from compatible pieces

The paper draws on SMOR, a German morphological analyzer. What matters for the Latvian design is the way SMOR represents pieces such as prefixes, stems, suffixes, and inflectional endings. It joins separately described pieces in order and uses agreement features to filter the resulting sequences. In this setting, agreement features are markers of compatibility carried by the pieces themselves. They let the description state that two pieces can combine only when the relevant markers match.

This approach makes the distinction between proposing a sequence and checking it explicit. A lexical description can first state that a class of words has a prefix position, a stem position, and an ending position. The descriptions attached to those positions may permit many choices. A filter then imposes the narrower linguistic requirements, such as whether an ending can occur with a particular prefix or whether a stem belongs to the group the ending expects. The same architecture can use a shorter sequence for a class whose words need fewer pieces.

For Latvian, the approach has a particular consequence for editing. A new noun, adjective, or verb can be described by entering its stem material and assigning it to a group whose endings and restrictions are already defined. That assignment carries substantial information. It determines which part of the ending inventory the new stem can use. If the entry has multiple stems, the description also has to say which stem serves which portion of the paradigm. The paper’s design makes those editorial decisions visible in the lexical source and delegates their conversion into finite-state notation to a script.

The choice of software follows the distinction between writing that source and compiling it. The Stuttgart Finite-State Transducer Toolkit, abbreviated SFST, supplies the specification language used in the paper’s examples. It supports regular-expression operations for combining descriptions and naming expressions that will be reused. OpenFst serves in compilation. The paper cites its support for weighted finite-state transducers and the ability to compile its source on Linux and Windows. The architecture thus connects the choice of notation for the linguistic description with the practical need to run the resulting tool on both platforms.

The method, step by step

Relating spellings to grammatical descriptions

A finite-state transducer describes a relationship between symbol sequences. One can think of it as a set of paths through states, with a path pairing symbols from opposite sides along the way. Where the sides agree, they can carry the same character. Where they differ, the pairing can change a character or a sequence. One side can also carry a symbol where the other side carries nothing. A morphological transducer uses these operations to associate the parts that make up a written form with the parts of its lemma and its grammatical description.

The relationship is useful in both directions. Suppose a written form has two admissible gender readings. There can be a path to each corresponding description. Conversely, if a request specifies a lemma and a particular set of features, selecting the matching path can yield a written form. The paper gives these operations separate interfaces because a caller asking for an analysis supplies different information from a caller asking for a form. Full paradigm generation has a third interface. It asks for a lemma together with its part of speech, the grammatical category to which the entry belongs, and returns the forms and their descriptions.

The numeral example shows what those differences mean in practice. Analysis takes piecu and returns pieci with the feminine or masculine plural genitive description. Synthesis can take pieci with the feminine plural dative description and return piecām. Full generation takes pieci with the numeral marker and returns the whole listed paradigm. In that output the spelling and the grammatical tag stay together, so repeated spellings remain distinguishable by their tags. For example, the two readings of piecu survive as distinct results even when the tool is working outward from the lemma.

The lexical relationships underlying the interfaces are closely connected. The paper describes writing the source for full form generation first and deriving the synthesis files from it. It then obtains analysis by inverting the synthesis transducer. Inversion exchanges the sides of the relation, allowing the tool to look up tagged lemmas from a spelling. The construction gives the three operations a common basis. A change to the lexical information can feed into the related transducers through the same build procedure.

From Latvian lexical entries to three morphological operations

The steps in order.

From Latvian lexical entries to three morphological operationsStep 1: Describe word forms and reusable ending groups1. Describe word forms and reusable ending groupsStep 2: Assign stems to groups and ending types2. Assign stems to groups and ending typesStep 3: Convert editable stem records into transducer expressions3. Convert editable stem records into transducer expressionsStep 4: Join prefixes, stems, and endings where applicable4. Join prefixes, stems, and endings where applicableStep 5: Filter combinations by matching their tags5. Filter combinations by matching their tagsStep 6: Combine the descriptions for each word class6. Combine the descriptions for each word classStep 7: Compile related transducers for the three operations7. Compile related transducers for the three operations

Changing the final symbol for each operation

In the paper’s compact notation, a colon between symbols or sequences pairs the material on its left with the material on its right. Angle brackets delimit special symbols. An empty pair of angle brackets represents the empty symbol, a place where one side contributes no material. The synthesis source uses the following final pairing in the numeral example.

<>:<1397>

Here <> is empty on the left, : separates the two sides of the pairing, and <1397> is the grammatical form identifier on the right. With this pairing the form identifier is available on the lemma side of the relation. That is the side used in a synthesis request, where the caller specifies which form to generate. The surface spelling produced by the lookup carries no form identifier in that position.

The full-generation source uses a different final pairing.

<1397>:<m>

Here <1397> is the same form identifier, : again pairs the two sides, and <m> is the part-of-speech marker for a numeral. The lemma side can be queried with the less specific numeral marker. The other side can then distinguish the individual forms by their identifiers. The notation displays the paired sides of the lexical description. The direction in which an application queries the relation depends on the operation, as the inputs and outputs for pieci illustrate.

The numeric identifier is inherited from the existing Latvian lexical database. In the sample it appears on its own as follows.

<1397>

The brackets enclose the identifier, and 1397 names a single form category in the database. The digits function together as an identifier. The paper interprets this particular value as a cardinal numeral in the feminine plural genitive.

During compilation with OpenFst, the identifiers are remapped to descriptions based on the MULTEXT-East tagset. The tag for this example is as follows.

<m0fpg000c0000000>

The angle brackets enclose one grammatical tag. The tag m0fpg000c0000000 encodes the same description as the database identifier, namely a numeral with feminine gender, plural number, genitive case, and cardinal status. The paper supplies the meaning of this tag as a whole. It gives the complete string that an application sees in the example without explaining every position of the wider tag inventory.

Remapping separates a source representation from the representation a caller receives. Existing lexical entries can keep the form identifiers they already use during preparation of the lexicon. An analysis or generation result can carry a feature description in the output tag. This is especially useful for the full paradigm interface. The caller can see both the written forms and the grammatical distinctions for which the lexicon supplies them.

Combining distinct descriptions by part of speech

The paper builds a separate transducer for each group of word classes and combines them by union. A union makes available the paths from each member. If a spelling can be analyzed by more than one member, the combined description can preserve the corresponding alternatives. The overall specification is written as follows.

$morph$ = $Pronouns$ | $Numerals$ | $Others$ | $Adjectives$ | $Nouns$ | $Verbs$

The enclosing $ signs mark names in the paper’s SFST notation, and = assigns the expression on the right to $morph$, the combined morphology transducer. The vertical bar | means union. $Pronouns$ and $Numerals$ are the descriptions for pronouns and numerals. $Others$ collects the entries treated in the paper as non-inflecting. $Adjectives$, $Nouns$, and $Verbs$ name the respective descriptions for the major inflecting classes handled through separate stems and endings.

The division is useful because the paper describes different classes at different levels of detail. For non-inflecting entries, it can attach identifying information directly to a lexical spelling. The sample is bravo.

$Others$ = bravo<1574>:<i> | …

$Others$ names the transducer, = defines it, and bravo is the lexical spelling shared across the relation. <1574> is the form identifier paired by : with <i>, the marker for the exclamation illustrated by this entry. The | permits alternative entries, and … indicates that the example leaves the remaining entries out. The paper allows an entry of this kind to carry multiple form identifiers where the lexical description calls for them.

Pronouns and numerals are also listed explicitly, but their entries can relate an inflected spelling to a different lemma. The pronoun examples show how the description handles a pair with different spellings and a pair with a common beginning.

$Pronouns$ = {man}:{es}<1474>:<p> | cit{am}:{s}<1634>:<p> | …

$Pronouns$ names the pronoun transducer, and = assigns its alternatives. Curly braces group a sequence in a pairing. In {man}:{es}, : relates the surface pronoun man, meaning ‘to me’, to the lemma es, meaning ‘I’. In cit{am}:{s}, cit is shared, and the pairing relates am to s, making citam and cits the two spellings. The paper glosses these as ‘to other’ and ‘other’. <1474> and <1634> are the respective form identifiers, <p> is the pronoun marker, | is union, and … stands for the additional entries.

These entries illustrate two distinct sources of variation. A spelling can differ substantially from its lemma, or it can share much of its spelling with the lemma. Both relationships can be represented directly. For explicitly listed classes, the lexical source gives the forms themselves. For the larger descriptions of nouns, adjectives, and verbs, a shared inventory of endings and a separate inventory of stems make it possible to express the same sort of relationship across many entries.

Defining endings and their conditions

The inflecting classes require a description of the endings, the classes those endings belong to, and the stems with which they can occur. The paper reports 15 ending groups for adjectives, 26 for verbs, and 69 for nouns. A group gives the endings relevant to a class of words. Inside a group, an individual ending can carry further restrictions. For verbs and adjectives, a prefix tag identifies the prefix category with which the ending can be used. For nouns and verbs, where a lemma can draw on different stems, an ending tag identifies the kind of stem required.

An ending also participates in a spelling correspondence. The ending of the observed form can be paired with the ending found in the lemma. The following expression shows two alternatives from one verb group.

$Verb2$ = <normEnd><PrefOther>{sim}:{t}<643>:<v> | <altEnd1><PrefOther>{a}:{t}<624>:<v> | …

$Verb2$ names the ending group and = defines its expression. <normEnd> and <altEnd1> are compatibility tags for two stem choices. <PrefOther> is the prefix category associated with each of the shown endings. The braces group the spelling material, and : pairs sim with t in the first alternative and a with t in the second. Thus sim and a are endings on the form side, while t supplies the lemma ending. <643> and <624> identify the grammatical forms represented by those alternatives, and <v> marks the lemma category as a verb. The vertical bar | gives a choice between alternatives, and … marks additional material in the group.

The same lemma ending can therefore be reached through several inflected endings. The difference among those paths is preserved through their restrictions and form identifiers. If a stem is licensed only for the alternate ending type, an ending tagged for the normal stem cannot be selected for it. Both paths can remain in the inventory because the conditions on their use are recorded with them.

The verb ending inventory then joins the group descriptions under a single name. Each alternative introduces a tag identifying its group.

$VInfl$ = <>:<Verbmodal>$Verbmodal$ | <>:<Verb2>$Verb2$ | <>:<Verb3_aam_refl>$Verb3_aam_refl$ | …

$VInfl$ names the verb inflection inventory, and = assigns it the expression to the right. Each <> is empty on the left and each : pairs it with the group marker on the right. <Verbmodal>, <Verb2>, and <Verb3_aam_refl> are identifiers for groups. The corresponding names in $ signs are the transducer expressions for the endings in each group. Juxtaposition puts a marker before the expression it identifies, | joins alternative groups, and … stands for other groups in the inventory. The full spelling of a group name serves as a label. Its role here is to match the appropriate group label on the stem.

The distinction between group tags and stem-choice tags matters for analysis. A group tag keeps a stem within its inflectional class. A stem-choice tag narrows the combination further, to an eligible stem within the entry’s paradigm. They answer different questions. A stem may belong to the right class while serving a different part of the paradigm. Keeping both tags lets the filter reject that combination. Prefix restrictions add another check where the word class calls for one.

Preparing the stem lexicon

The paper uses a dedicated editing format to keep the stems of one entry on the same line. The format separates stable group definitions from the lexical entries that editors change. A group definition records its identifier, the maximum number of stems for an entry in the group, and ending information for the corresponding stem positions. Lexical lines then supply the actual stem material. The script uses the position of each stem together with its group definition to produce the required transducer notation.

The example for the group used by barot reads as follows.

<Verb2> 2 |t<normEnd> |u<altEnd1>

<Verb2> is the group name, and 2 is the number of stems required for the illustrated group. In this editing format | marks the division before ending information for a stem position. The letters t and u are endings recorded for those positions. <normEnd> assigns the normal ending type to the first stem, and <altEnd1> assigns an alternate ending type to the second. This use of | belongs to the editing file. In the transducer expressions, the same mark denotes a choice among alternatives.

The definition for the group used by iet illustrates a larger inventory of stems and more than one ending tag for some positions.

<Verbmodal> 4 |t<normEnd> |u<normEnd1><altEnd1> |u<normEnd2><altEnd2> |<altEnd3>

<Verbmodal> names the group, and 4 is the number of stems required for it in the example. The bars divide the stem specifications. t and u are the spelled endings where a position specifies one. <normEnd>, <normEnd1>, and <normEnd2> are normal ending tags for the indicated positions. <altEnd1>, <altEnd2>, and <altEnd3> are alternate ending tags. A position can provide more than one tag, as the second and third specifications show. The fourth specification gives an alternate tag without spelling out an ending before it.

The paper says that the verb groups provide infinitive and present stems. A group can also call for a past stem, another present stem, or stems used in participles. The inventory of stem positions therefore depends on the group. The editing format records this variation once in the group definition. An editor filling in an entry then has a pattern for the number and arrangement of its stems.

The entry for barot supplies the following pieces.

baro|t baroj|u

Here baro and baroj are the stem strings for the entry. The bars separate them from t and u, respectively, and the space separates the two stem records. This line belongs to <Verb2>. The script can use the two positions to attach the normal and alternate ending tags defined for that group. The entry’s content and the group’s instructions jointly determine the finite-state expression.

The entry for iet supplies a different set of pieces.

ie|t ej|u gāj|u iet|

ie, ej, gāj, and iet are the stem strings recorded for the entry. The bars again divide stem material from ending material, and spaces divide the records. The first position has t, the next positions have u, and the last position has no spelling after the bar. The group for this line is <Verbmodal>. Its definition accounts for the extra stem positions and for the ending tags that the alternate forms will need.

The procedure is a conversion of structured lexical data. Its inputs are the inventories, the group definitions, and the edited entries. The paper describes a script that translates the records into SFST expressions and adds the tags. The editing format also has a linguistic purpose. Placing the related stems together makes it possible to see which material belongs to one paradigm, even when the stems have very different spellings. The generated expression can then express that relationship in terms of character correspondences.

How the script expresses a multi-stem entry

The paper shows the result of this conversion for iet in several pieces. The ordinary infinitive stem is represented as follows.

ie<normEnd><Verbmodal>

ie is the shared stem spelling in this part of the relation. <normEnd> marks the normal ending type, and <Verbmodal> marks the inflectional group. Putting the tags after the stem makes the corresponding restrictions available when the description is joined to the endings.

The next piece begins with the present stem and assigns a different normal ending tag.

ej<normEnd1><Verbmodal>

ej is the stem spelling used here, <normEnd1> is the tag for this normal ending type, and <Verbmodal> gives the same group as before. The group tag keeps these different stems within the same inflectional class. The different normal tags give the ending inventory a way to address the stems separately.

Another piece relates the spelling of that stem to the lemma stem in the alternate path.

e:ij:e<altEnd1><Verbmodal>

The colons pair characters across the relation. e:i pairs e with i, and the adjoining j:e pairs j with e. The consecutive pairs relate ej to ie. <altEnd1> is the alternate ending tag for this path and <Verbmodal> marks its ending group. The compact expression can therefore present the stem needed on the inflected side while allowing the other side to recover the lemma spelling.

The corresponding normal piece for the next stem uses the spelling gāj.

gāj<normEnd2><Verbmodal>

gāj is the stem string, <normEnd2> identifies its normal ending type, and <Verbmodal> gives its group. The alternate path for this stem spells out a different correspondence.

g:iā:ej:<><altEnd2><Verbmodal>

g:i pairs g with i, ā:e pairs ā with e, and j:<> pairs j with the empty symbol <>. Here the colons associate the characters or the empty material on opposite sides, so the full spelling gāj corresponds to ie. <altEnd2> identifies the relevant alternate ending type, and <Verbmodal> retains the group assignment. The aligned strings can differ in length because a character on one side can correspond to an empty position on the other.

The last piece shown for the entry is as follows.

iet:<><altEnd3><Verbmodal>

ie is shared material. At the end of the stem t:<> pairs t with the empty symbol on the other side. <altEnd3> identifies the alternate ending type used for this stem position and <Verbmodal> identifies the group. The representation lets the entry include the stem written as iet in the editing file while connecting it to the stem material used on the lemma side.

This detailed example shows why the paper distinguishes the editing line from the compiled lexical description. The editor sees the stems of the paradigm together. The transducer receives explicit correspondences and tags that can be checked against the endings. The character mappings for iet serve a lexical entry whose forms draw on different stems. A general rule for replacing one particular final consonant would address a different pattern, which the paper discusses as future work.

Assembling candidates and checking their tags

Once the inventories exist, the next step is concatenation, which places component expressions in sequence. The verb expression joins a prefix component, a stem component, and an inflection component.

$Verbs$ = $VPrefix$ $VStems$ $VInfl$

$Verbs$ names the resulting verb transducer, = defines it, and the three names on the right refer to verb prefixes, verb stems, and verb inflectional endings, respectively. The enclosing $ signs delimit expression names. Their juxtaposition means concatenation in the displayed order. The expression establishes where each kind of material can appear.

The adjective expression has the same arrangement at the level of components.

$Adjectives$ = $APrefix$ $AStems$ $AInfl$

$Adjectives$ names the adjective transducer and = supplies its definition. $APrefix$, $AStems$, and $AInfl$ are the adjective prefix, stem, and inflection descriptions. The adjacent expression names ask for their sequences to be joined in that order.

The noun expression uses a stem followed by an inflectional ending.

$Nouns$ = $NStems$ $NInfl$

$Nouns$ is the noun transducer, = defines it, $NStems$ supplies the noun stems, and $NInfl$ supplies noun inflectional endings. Their juxtaposition concatenates the components. The formula describes the two constituent inventories used for nouns in the implementation.

The paper gives a concrete verb sequence with metadata at the boundaries between its components.

<PrefJa>jā lob<>:ī<altEnd1><Verb3> <Verb3><altEnd1><PrefJa>{a}:{t}<649>:<v>

The spaces distinguish the prefix, stem, and ending parts in the example. <PrefJa> is the prefix compatibility tag and jā is the spelling supplied in the prefix part. lob is shared stem material. The pairing <>:ī associates the empty symbol with ī, so the stem part can contribute that letter on the other side of the relation. <altEnd1> labels the stem and ending type, while <Verb3> labels the group. The ending part carries matching <Verb3>, <altEnd1>, and <PrefJa> tags. The curly braces group a and t, and : pairs the inflected ending a with lemma ending t. <649> is the form identifier and <v> marks the verb category.

The matching tags show why the example can pass the filter. The stem and ending identify the same inflectional group. Their stem-choice and ending tags agree. The ending also permits the prefix category named in the prefix part. In the assembled lexical description, the tags carry the information needed for these decisions alongside the spelling correspondences. The constraints can therefore operate on the choices the system has made even when those choices would be hard to recover from the spelling alone.

The paper applies the constraints by composition with filters. In this use of composition, a candidate survives only if the assembled representation satisfies the conditions expressed by the filter. Concatenation specifies the order and the available material, while composition enforces agreement across the pieces. This allows the lexicon to define a group of endings once and use it for different entries. The filter determines which of the resulting combinations actually belong to each entry.

The paper’s two toolkit choices fit these stages. SFST gives the source a notation for naming descriptions, joining strings, taking unions, inserting symbols, and composing expressions. OpenFst is used for compilation, including the remapping from internal form identifiers to the output tag descriptions. The paper gives support for weighted transducers as a reason for choosing OpenFst. Its description of Latvian analysis, synthesis, and generation follows the paths licensed by the lexical descriptions and filters. It supplies no scoring procedure for deciding which reading of an ambiguous spelling is most likely in a sentence.

Experiments and results

A dictionary benchmark for isolated words

The evaluation uses 37,964 words from the Latvian portion of a Latvian–English dictionary. The first task is to run morphological analysis on those words with both tools. The baseline is the earlier Latvian analyzer based on the relational lexical database, and the comparison system is the new finite-state implementation. The paper reports elapsed time and word throughput. Throughput counts analyzed input words per second, so a higher figure means that more of the dictionary input passed through the analyzer in a given time.

Using one collection for both implementations makes the comparison direct in an important respect. They face the same set of written inputs, rather than timed runs on different vocabularies. The unit is an input word. An input such as piecu can lead to several analyses, but the throughput figure counts the processing of the word submitted to the tool. The paper gives no separate rate for generating individual analyses within the output.

The timing is also distinct from an accuracy measurement. The experiment establishes the time each implementation took to produce its output on the dictionary words. Testing whether all and only the appropriate analyses were returned would require a checked set of expected readings for each word and a method for comparing those sets. The evaluation reports that the outputs differ slightly and attributes those differences to corrections made in the lexicon. It does not give a separate numerical score for the analyses.

Analysis speed on Windows and Linux

The timed Windows comparison was run on Windows 7 with an Intel Core i7-2600 processor at 3.40 GHz and 8 GB of RAM. On that computer, the previous tool took 2 minutes to analyze the dictionary input. Its reported throughput was 316 words per second. The finite-state tool took 4 seconds and had a reported throughput of 9491 words per second.

Analysis throughput on the Latvian dictionary words on Windows

The finite-state analyzer processed the shared dictionary input faster than the earlier analyzer.

Analysis throughput on the Latvian dictionary words on WindowsPrevious Latvian analyzer: 316Previous Latvian analyzer316Finite-state Latvian analyzer (this paper): 9491Finite-state Latvian analyzer (thispaper)9491
The numbers
System or settingwords per second
Previous Latvian analyzer316
Finite-state Latvian analyzer (this paper)9491

The throughput figures and the elapsed times are two ways of describing the same Windows comparison. The elapsed times concern the whole dictionary task. The throughput rates describe the pace of analysis in the unit the paper reports. Both are tied to the chosen collection and the computer used in the experiment. The large timing gap is a property of the two implementations as they were run there.

The paper also reports similar speed for the finite-state tool on a computer running Ubuntu GNU/Linux. That machine had an Intel Core 2 CPU 6300 at 1.86 GHz and 7.74 GB of RAM. The Linux run establishes that the tool performed this task on Linux as well as Windows. The paper supplies no separate elapsed time or words-per-second figure for Linux, so the quantitative comparison in the chart is confined to Windows. The two computers had different configurations. The Linux observation gives evidence of use on another platform, while the shared Windows setup gives the direct comparison with the earlier analyzer.

These results speak to the practical motivations behind the replacement. The Windows test measures the time needed to process a dictionary-sized collection under shared conditions. The Linux observation supplies an instance of the new tool working on a second operating system. The third motivation, easier lexical editing, is addressed through the design of the editable stem files. The evaluation does not time that activity.

Timing the request for a full paradigm

The second task uses the same 37,964 dictionary entries, with a different sequence of operations. The tool first analyzes a written word. A script takes the lemma and part of speech from the resulting analysis and passes them to the form generator. The generator returns the paradigm associated with that request. This procedure uses analysis to obtain the same kind of input that a full-generation request normally requires. It exercises the relationship between the two operations on one collection of word forms.

The earlier tool took 7 minutes and 25 seconds for this task. The finite-state tool took 27 seconds. These are elapsed times for the workflow as reported. The paper specifically cautions that the timing includes additional work by the script while it processes the analysis results. The script is needed to get from the original dictionary input to the lemma and part-of-speech information used in the next stage. Its work is consequently part of the measured procedure.

The unit of work here also differs from the unit of work in the first experiment. Each dictionary item initiates a request whose final output is a collection of tagged forms. Paradigms can contain several grammatical descriptions, including descriptions that share a spelling, as the numeral example demonstrates. The paper reports neither the total number of returned forms in the experiment nor a rate per generated form. The elapsed times compare how long the implementations took to complete the dictionary workflow without assigning a uniform cost to an individual paradigm.

The evaluation thus contains two measured comparisons involving the older tool. The first isolates morphological analysis as the user-facing task and reports throughput for the Windows runs. The second follows analysis with form generation and reports elapsed time for that broader procedure. Form synthesis with a specific grammatical description is part of the design and appears in the worked numeral example. It receives no separate timing or aggregate evaluation in the paper.

What the output comparison establishes

The comment about differences between the outputs matters because the older analyzer is a practical baseline rather than independently verified ground truth. A change to a lexical entry can make the new output differ from the old one for a legitimate reason. It is therefore possible to have a meaningful speed comparison on common inputs while the proposed tool and its baseline return slightly different analyses. The evaluation treats these as separate observations.

The paper does not enumerate the corrected entries or report how many analyses changed. Accordingly, the results do not establish a rate of agreement, an improvement in accuracy, or the coverage of either system on this dictionary. They do establish that both systems were applied to the same data for the comparison and that the newer implementation completed the measured tasks in less time. The worked examples illustrate what the representation can express, while the dictionary runs show the execution times of actual analysis and full-generation workflows.

What the ablations show

The paper presents no component ablation, offering comparisons with the previous tool, a cross-platform speed observation, and worked examples of the lexical representation.

The Windows comparison controls the input collection and the operating environment for morphological analysis. That makes it possible to ask how the two complete implementations perform when faced with the same task on the same computer. The comparison changes the implementation as a whole, including the way the lexicon is represented and used. There are also minor differences in the outputs associated with lexical corrections. The timings therefore cannot assign a share of the speed gain to an individual choice such as the use of union for word classes, the way the ending filters are built, or the compiler.

The second comparison asks about a different operation by making analysis feed into paradigm generation. Its result shows that the time advantage also appears in the reported end-to-end procedure. Because the procedure includes extra script processing, the comparison cannot isolate the cost of the transducer that generates forms. It also does not vary the script, the source of the lemma, or the size of the requested paradigm. The measured result concerns the workflow the paper actually ran.

The Linux observation addresses portability more directly than it addresses the causes of speed. Running the tool on Ubuntu GNU/Linux demonstrates that the compiled solution can be used there. The reported similarity in speed is descriptive. With a different machine and no separate performance figure in the paper, the comparison does not identify how much the operating system or the hardware contributes to execution time.

The linguistic examples provide a different kind of analysis. The numeral demonstrates why an analysis can return more than one feature description and why a paradigm generator needs to preserve both tags when one spelling serves different grammatical functions. The pronoun examples distinguish a listed spelling correspondence from a correspondence that shares several initial characters. The verb entries show why a group membership tag and an ending type tag have separate roles. These examples establish what the representation can express and how a licensed path is assembled. They supply no frequency estimate for these patterns in the dictionary benchmark.

The filter example also helps interpret the scope of the paper’s claim about correctness. Matching tags license a combination under the rules encoded in the lexicon. A demonstration of a matching sequence explains the mechanism for excluding incompatible sequences, but the accuracy of the resulting analyses still depends on the group definitions, entries, and tag assignments. The paper gives the representation a way to enforce those decisions consistently. It does not test how often a particular filter prevents an error or how many correct outputs would survive if a filter were removed.

Limitations

Limits identified in the paper

The paper describes a lexicon that mainly lists the stem variants needed by its entries. It identifies an exception for nouns built from verb stems with the suffixes –tāj, –um, –ēj, and –šan. For the wider inventory, the paper proposes deriving stems that follow regular consonant alternations as a way to reduce the amount of material stored in the lexicon. The proposal concerns how the tool would obtain some stem variants. The evaluated implementation generally already needs the relevant stem material to be present.

A regular spelling change still requires a grammatical condition. The paper gives noun patterns in which the stem’s final consonant or consonants can change in particular declensions and forms. It points to the plural genitive for nouns of the fifth and sixth declensions, and to the singular genitive and plural cases for nouns of the second declension. The noun’s class and the requested grammatical form both bear on whether the change applies. The paper also notes exceptions, meaning that even a class and form combination associated with the alternation can contain stems that need different treatment.

The proposed replacement inventory is written as follows.

$nounAlt$ = ({b}:{bj} | {c}:{č} | {d}:{ž} | {dz}:{dž} | {l}:{ļ} | {ln}:{ļņ} | {m}:{mj} | {n}:{ņ} | {p}:{pj} | {s}:{š} | {sl}:{šļ} | {sn}:{šņ} | {t}:{š} | {v}:{vj} | {z}:{ž} | {zl}:{žļ} | {zn}:{žņ} | {ll}:{ļļ} | {nn}:{ņņ})

$nounAlt$ names the proposed noun alternation expression, and = defines it. Parentheses enclose the inventory of alternatives and vertical bars separate the alternatives. Braces enclose each consonant sequence. In every pair : relates the sequence on the left to the corresponding sequence on the right. Thus the expression includes pairs such as b with bj, c with č, and ln with ļņ. The marked Latvian letters are parts of the spelling strings, and every pair is an alternative consonant correspondence. The expression gives the possible changes. Applying them as a productive rule would also require the restrictions that identify eligible nouns and forms.

Coverage is another stated limitation. The paper observes that the lexicon omits some words and that new vocabulary includes foreign words, specialized terms, and compounds. It calls for adding compounding rules to make more forms analyzable. Group-based editing supports adding a known entry to an existing pattern. Compounding rules would instead give the tool a way to handle some words by recognizing how their components are combined. That extension belongs to the paper’s future work, so no coverage gain from it is measured.

The paper also limits the interpretation of the full-generation timings. The reported run includes the script’s handling of analysis results as well as the generation operation. Its elapsed time is therefore a measure of the tested procedure. It does not establish the execution time attributable to the form generator alone or the per-request cost when a caller already has a lemma and part of speech.

Limits visible in the evaluation

The dictionary benchmark is a test of the listed inputs under the conditions reported. Large collections of running text are part of the motivation, but the evaluation does not report a separate benchmark on running text. The timings leave open how the implementations would behave on collections with a different mix of repeated words, unlisted words, or ambiguous forms. The reported dictionary rate remains meaningful on its own terms without settling those questions.

The distinction between listing possible analyses and resolving ambiguity in a sentence is also important. The paper’s input for analysis is a word form, and its output can be a set of tagged lemmas. The piecu example shows the system keeping both gender analyses. A task that asks which reading a speaker or writer intended would require evidence from surrounding words or other context. No contextual choice among analyses is part of the reported benchmark, and the full-generation interface similarly starts with a specified lemma and category.

The paper’s claim about easier extension is supported by the structure of the lexical source. An editor can keep the stems of one entry on a single line and use ending information defined for its group. The paper provides no comparison of the time editors spent, the number of editing errors made, or the difficulty of adding entries that call for a new group. The demonstrated benefit is a concrete route for adding stems under pre-defined groups. The results do not quantify the effort saved by that route.

Finally, the paper gives point timings for its comparison. It does not report variation across repeated runs, start-up and compilation costs, memory consumption during analysis, or a scale curve as the lexicon grows. The computer specifications describe the environments used in the comparison, while the measured results concern the time to perform the selected tasks. Together with the examples, the experiments document a working Latvian analyzer and generator and a substantial runtime improvement on the reported dictionary workload. They leave the accuracy, coverage, and resource demands of broader use open.

What came after

Paikens’s later work on Latvian computational morphology cites Deksne’s paper and continues the same line of inquiry into computational descriptions of Latvian word structure. The citation establishes a connection between the works. It leaves open whether Paikens reused the finite-state representation, the editable stem groups, or the earlier tool as a benchmark. More specific claims about what the later work inherited would require an account of its method and its use of Deksne’s design. Paikens’s study of Latvian computational morphology

Cite

Cite as Daiga Deksne. 2013. Finite State Morphology Tool for Latvian. Proceedings of the 11th International Conference on Finite State Methods and Natural Language Processing.

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{daiga2013finite,
  title = {{Finite State Morphology Tool for Latvian}},
  author = {Daiga Deksne},
  booktitle = {Proceedings of the 11th International Conference on Finite State Methods and Natural Language Processing},
  year = {2013},
  url = {https://aclanthology.org/W13-1809/}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/deksne-2013-finite-state-morphology-tool-latvian/