A Wide-Coverage Context-Free Grammar for Icelandic and an Accompanying Parsing System
Paper · 2019 · Vilhjálmur Þorsteinsson, Hulda Óladóttir and Hrafn Loftsson
Summary
To understand who did what in an Icelandic sentence, a parser has to decide both what the individual words are doing and how they fit together. A written form can belong to several word categories, and the role of a phrase can depend on inflection as well as position. The authors build an open-source system that considers these decisions together. Its starting point is a hand-written context-free grammar, a set of rules that describe how words and smaller phrases combine into larger structures.
The grammar uses compact templates to express agreement in case, gender, number, and person. Expanding those templates gives over 5,600 nonterminals, 4,600 terminals and 19,000 productions. An inflection database supplies possible readings for each word, and the parser tests those readings as it builds phrases. An enhanced Earley algorithm stores competing analyses in a shared structure, reusing the parts they have in common. Hand-tuned scores select one tree from that structure and resolve the word categories and grammatical features along with it. A special scoring step helps decide which verb or noun phrase a prepositional phrase belongs with.
The authors measure how often the system returns a tree and how well its chosen tree matches a human analysis. It produces at least one tree for about 90% of the 8.7 million sentences collected from news articles. For the accuracy test, the authors hand-annotate 80 randomly selected news sentences and correct spelling and grammar errors before parsing. The grammar covers 78 of those sentences. On that subset, the selected trees score 71.90% F-measure against the human annotations, after both are expressed in the same simplified format. Errors frequently involve the attachment of prepositional phrases and subordinate clauses.
The study shows that a large explicit grammar can support full-sentence analysis of Icelandic news and feed applications such as extracting a person's title from an article. Coverage measures whether the system found a possible structure. The smaller accuracy test measures how closely the structure it chose agrees with a human analysis. The two results describe different parts of the same task.
Deep dive: A Wide-Coverage Context-Free Grammar for Icelandic and an Accompanying Parsing System
A hand-written Icelandic grammar and an Earley parser use inflection and shared parse trees to analyze news sentences and resolve ambiguity. · about 35 minutes to read
The problem and its context
A sentence can leave several decisions open
A reader can recognize an expression as a person's title whether it follows a name, appears in a clause that describes the person, or takes a different grammatical form in another sentence. The authors wanted to recover such associations from Icelandic websites. They also wanted to connect named entities with definitions. A search for a fixed string would leave much of that work undone, since a name and its description can be related through the structure of a sentence even when they appear in different arrangements. Finding the phrases and identifying their grammatical relationships was a step toward information extraction.
In Icelandic, a word's form supplies evidence about those relationships. A noun and its determiner can share case, number, and gender. A verb's form can supply information about person and number. A preposition can call for a particular case on the phrase it introduces. Such patterns give a parser ways to rule out analyses. Yet the same sequence of letters can correspond to several sets of grammatical features, sometimes from different word categories. There is a practical question at the heart of this use of morphology: how long should a parser keep those readings available while it works out the structure?
The authors keep alternatives available until the sentence provides more evidence. A plausible word reading in isolation can lead to a dead end once the grammar checks the surrounding phrase. Conversely, a reading that looks unlikely on its own can be the one that makes the sentence fit. A system that commits to a category for every word before assembling the sentence gives up the chance to use that later evidence. The paper therefore treats part-of-speech tagging and sentence analysis as coupled decisions.
The sentence-level decision is an instance of parsing. In the representation used here, a tree shows which words make up phrases and which phrases in turn make up clauses. The grammar may permit a prepositional phrase to form part of a noun phrase, for instance, or to sit inside a verb phrase. Both trees can cover the same words and still give different accounts of what goes with what. The authors need a procedure that can construct the alternatives and choose a useful reading for the applications that consume the tree.
Why write a grammar by hand?
A rule can state that a phrase consists of particular kinds of material in a particular order. Rules can refer to other phrases, so a relatively small example grammar can already exhibit recursion and nesting. The authors distinguish these instructional examples, frequently written for English, from a grammar meant to account for the variety of sentences in the news. A realistic grammar needs both ordinary phrase patterns and less frequent constructions. It also needs to specify which word forms are compatible across parts of a rule, including cases where the relevant words need not be adjacent.
Writing and maintaining those rules was one reason a wide-coverage grammar had seemed expensive. Another was the cost of running a general parser on an ambiguous input. A grammar designed to describe genuine alternatives may assign many trees to a sentence. An implementation that represents every tree independently would repeatedly store analyses of the same spans. The authors wanted a general algorithm that could accommodate ambiguity, preserve the connection between trees and grammar rules, and run at a speed useful for processing articles.
The paper describes a common alternative of the time. Given a collection of sentences with trees already assigned, a researcher can derive grammar rules from those trees and estimate probabilities for them. The annotated collection is a treebank. In the paper's account, assembling a reliable treebank also takes sustained manual work. Its annotators must decide which structural distinctions to represent and apply those decisions consistently. Some of that linguistic work resembles grammar writing, although the immediate product is a collection of analyzed sentences.
The authors also point to a difficulty with estimating probabilities from examples for morphologically rich languages. The same grammatical relationship may appear with different inflected forms and word orders. Evidence for a particular configuration can therefore be sparse even when the relation itself is common. A hand-written rule can express a generalization across these configurations. A rule template can do the same for agreement by stating which features must correspond, leaving the system to generate the individual combinations. This is the motivation for trying explicit rules in Icelandic. The paper does not treat the choice of rules as evidence that methods trained on treebanks are intrinsically unsuitable.
The parsers and treebanks already available
The paper identifies precedents for both feature-based rules and the use of Earley parsing in a morphologically rich language. The English grammar in the GATE system was developed to accompany SUPPLE, a bottom-up chart parser. A chart records intermediate analyses so that the parser can reuse work, and a bottom-up procedure starts with smaller recognized pieces and assembles them into larger ones. SUPPLE's grammar includes features for agreement. For the Icelandic authors, it is an example of an explicit grammar built to work with a general parser.
The Urdu system discussed in the paper uses an extended Earley algorithm and a grammar extracted from a treebank of 1,400 sentences. The Icelandic authors suggest the small supply of annotated sentences as a reason for the Urdu project's choice of approach. For scale, they give 40,000 sentences for the Penn Treebank. These counts describe the resources in that historical discussion. They do not constitute a result on Icelandic or a comparison of parser accuracy.
For Icelandic itself, the authors describe IceParser as a shallow parser. It takes text that has already been assigned part-of-speech tags and incrementally marks constituents and syntactic functions with finite-state machinery. It can label useful pieces of a sentence. The authors were seeking a full derivation, with the pieces connected under a shared sentence structure and with the lexical choices open during that derivation. They report that Icelandic had no full parser before their project.
Icelandic already had an annotated resource, the Icelandic Parsed Historical Corpus, or IcePaHC. The paper describes it as containing one million words, with material extending from the late 12th century to the present and about 10% classed as modern Icelandic. Its trees follow a Penn Treebank-style scheme. The paper also describes a project that used IcePaHC to train a probabilistic parser with the aim of improving analysis of the related language Faroese. The Icelandic news parser instead draws its rules from manual grammar development and uses news text to guide their revision.
The goals broadened during the project. In addition to recovering facts from news, the authors wanted to use the grammar to recognize common error constructions through specially marked rules and parser configurations. Automatically produced trees also accumulated into a resource for a separate parser-training project. These uses ask different things of a tree. An extractor needs the relation relevant to a fact, while a grammar checker needs a way to recognize a faulty construction and explain what is wrong. The paper develops a common parsing system that can supply structures for such work.
The method, step by step
From written words to a selected tree
The first pass through a sentence identifies tokens, the units that later stages consume. Most words remain individual tokens, while recognized expressions such as dates can be combined. The system then attaches possible dictionary readings to each word token. The grammar examines those readings as it builds candidate structures. Whenever several structures reuse a phrase over the same span of input, the parser can share its representation. A separate pass scores the alternatives and returns a tree together with the word readings that support it. The first of these operations is tokenization.
From Icelandic text to a selected parse tree
The steps in order.
This sequence divides the work between preparation, search, and selection. Word lookup makes possible readings available. The grammar determines which combinations are licensed. The scoring procedure chooses among structures the grammar has licensed. A confident score cannot give the system a derivation for a construction absent from the grammar. Likewise, a grammatical derivation can end up with a low score because other readings fit the authors' preferences better.
Look up readings without deciding between them
The lexical resource is the Database of Modern Icelandic Inflection, abbreviated DMII. It associates over 6 million lexical entries, representing 2.8 million unique word forms, with dictionary headwords, word categories, and morphological features. A dictionary headword is a lemma. Keeping it alongside the category and features lets the grammar ask either for any suitable member of a category or for a particular dictionary word in a suitable form.
A lookup therefore produces a set of candidate descriptions. The paper illustrates the range with á. Its readings include a verb meaning ‘own’, noun readings for a female sheep and a river, and a preposition meaning ‘on’. The form also has adverbial and interjection uses. The system associates 14 possible tags with it. Some ambiguity concerns which dictionary word is present, while some concerns the features of a reading. The parser receives those possibilities together and can test any of them against the position the token would occupy in a rule.
The same arrangement allows more than one plausible path through a sentence. A rule expecting a preposition can use a prepositional reading of a token, provided that the rest of the phrase also fits. A different rule can test a nominal reading of the same token and look for a structure that supports it. The tags are candidates for specific uses of the word in the sentence. The grammatical context that eventually wins determines which candidate is assigned.
Tokenization resolves a different kind of choice ahead of the grammar. The system greedily recognizes selected spans, including dates and certain adverbial idioms, and passes a recognized span onwards as a compound token. An idiom handled this way arrives as a single unit for the parser to match. This cuts down on possible groupings of its individual words and reduces the amount of ambiguity passed to the next stage. For these spans, the tokenizer has already established the boundary of what it treats as multiword expressions.
Find a usable ending for an unfamiliar compound
The lexicon is extensive, but Icelandic can produce compounds whose full spellings are absent from it. The paper calls a form missing from the database out of vocabulary, or OOV. The authors use the fact that a compound's final component can supply inflectional information for the whole word. If the complete form cannot be looked up, the system tries to find a known suffix whose tags can serve in its place.
For that search, the authors put the database's word forms in a directed acyclic word graph. This is a representation of possible letter sequences as paths, with no cycle that would lead the search back to an earlier point on the same path. When analyzing a compound, the goal is to find the longest possible suffix preceded by as few prefixes as possible. Once the suffix has been identified, the parser can use its lexical tags as candidates for the full compound. The division is useful here because it helps recover the inflection and category that the grammar will examine.
The paper gives menntamálaráðherra, the title of the minister responsible for education, as an example. The analysis separates mennta, mála, and ráð from the final noun herra. The inflection of herra supplies the relevant information for the longer word. The grammar can then test the compound in a nominal position without needing an entry for the whole title. The operation supplies possible grammatical readings, leaving the sentence analysis to determine which reading fits the context.
Some unfamiliar strings defeat this search. The paper mentions foreign words, spelling errors, and previously unseen named entities as possible cases. The fallback treats such a string as a neuter singular noun that can match a noun terminal in any of the four cases. This keeps a sentence in consideration when it contains a word the system cannot analyze. It also makes a particular assumption about category, gender, and number while deferring the case decision to the grammar. The resulting tag is a way to continue the search under uncertainty about the word.
Match a spelling, a lemma, or a category
The grammar's rules connect nonterminals and terminals. A nonterminal names a structure that a rule can break down further, such as a noun phrase or a clause. A terminal is where that breakdown meets the input. In this system a terminal can specify a surface spelling, a particular lemma and category, or a category with any lemma. The last two kinds can also specify features. This makes the connection between grammar and dictionary explicit at the point where a rule calls for a word.
A literal terminal looks directly at the token text and ignores differences in letter case. The authors use literals for some conjunctions. This form is convenient when a construction calls for a particular written word. It avoids having to express the condition as a chain of dictionary properties in a place where the spelling itself suffices.
A lemma terminal asks for a particular lexical item and category, with optional feature conditions. The paper's example uses hafa, ‘have’, as a verb and requires singular number. That description accepts forms such as hef, hafðir, and hefur through their lexical tags. The written forms differ, but the rule can name them together as inflections of hafa. The authors use this type of terminal for auxiliaries in complex verb constructions, where the identity of the auxiliary matters.
A lookup terminal omits the fixed lemma. The grammar can ask for a noun with neuter gender, singular number, and nominative case, and any word token with a reading satisfying all of those conditions can match. In a different construction it can ask for a singular verb in the third person. The paper illustrates both readings with veður, which can denote weather as a noun or mean ‘wades’ as a verb. The two terminal matches let the grammar consider quite different trees for the same written token.
All features on a terminal have to agree with one candidate tag. Consider the nominal reading of veður. To match a terminal requiring neuter singular nominative, a single description in the token's profile must provide all those properties together. The terminal cannot borrow a feature from a separate reading. This matters whenever a written form is ambiguous across inflections, because independent checks for each feature would admit combinations that the dictionary never assigned to the word.
Expand agreement into ordinary rules
The authors write the grammar in a text file using an extension of Enhanced Backus–Naur Form, or EBNF, a notation for specifying production rules and conveniences such as optional elements. Their extension adds features called variants. A rule writer can put the same variant on several symbols in a rule and have the grammar loader substitute the same value at each occurrence. The shorthand makes the agreement requirement visible at the point where the pieces of the phrase are declared.
The principal variant inventories cover masculine, feminine, and neuter gender, singular and plural number, the nominative, accusative, dative, and genitive cases, and the three persons. A terminal can require a particular setting, such as accusative case. A nonterminal can also carry a setting, so that the outside of a phrase states the feature values required inside it. Once the variants have been expanded, those values are part of the names of ordinary grammar symbols.
The paper illustrates this with a simplified noun phrase. The phrase can contain a determiner and must contain a noun. The determiner and noun symbols carry case, number, and gender. A determiner rule leads to a terminal for determiners with those values, and a noun rule leads to a terminal for nouns with the same values. If the determiner is present, the two categories must be able to match the common settings of the expansion used by that derivation. The optional determiner also permits a derivation that proceeds with the noun on its own.
For one expansion the rules can use nominative, singular, and masculine throughout. Another expansion can use nominative, singular, and feminine. This is a mechanical substitution, and a shared variant retains the same value wherever it occurs in a given expansion. For the simplified fragment, the authors give the following count.
3 × 4 × 2 × 3 = 72
The first 3 is the number of written productions in the fragment. The 4 counts cases, the 2 counts numbers, and the last 3 counts genders. The multiplication signs indicate that the rules are expanded across the combinations of these settings. The equality gives 72 expanded productions for this example. Person is part of the wider grammar and does not figure in this noun-phrase count.
The expansion shifts a feature check into the structure of the rules. For instance, a version of a noun phrase that calls for a feminine determiner and noun will lead to terminals that test those features. The grammar contains other versions for other settings. During parsing, these are different derivations using different ordinary symbols. The grammar writer can maintain a compact statement of agreement even though the parser works with a much larger set of explicit productions.
This arrangement also helps explain the paper's use of the term context-free. Icelandic phrases can contain elements that have to agree. The authored rule expresses that dependency compactly, and each expanded rule expresses a single combination through its own symbols. The parser can recognize the resulting rules as context-free productions. The procedure for giving extra weight to certain prepositional attachments comes later, after these rules have been used to recognize valid derivations.
Grow the grammar through reading its output
The authors first established how tokens would match terminals. They then wrote an initial core covering basic sentence forms and straightforward versions of noun, verb, prepositional, and adverbial phrases. They tried this grammar on a reference collection drawn from typical news articles. When an article exposed a substantial gap, they revised the rules and ran the parser again. The collection of reference texts grew as coverage increased.
The development interface supported two types of inspection. It marked sentences for which no derivation was found, so a developer could locate missed constructions in the context of an article. It could also display a tree for a successfully parsed sentence, so a developer could examine the relationships the parser had actually selected. A coverage failure calls attention to the absence of a complete derivation. A displayed tree can expose a problem even if the grammar assigned a structure all the way to the root.
The paper describes a grammar file of about 5,800 lines including comments and estimates the construction effort at 2–3 person-years. The file also contains annotations that the scoring pass reads. These annotations let the authors express preferences for some constructions alongside the rules that make them possible. The reference-news procedure was iterative grammar development, with human inspection guiding changes. Both the grammar and the scoring preferences were written and tuned by hand.
Build a forest without copying every tree
The parser is a C++ implementation of the Earley–Scott–Johnstone algorithm. The original Earley procedure works top down and can recognize strings for general context-free grammars. In this setting, recognition answers whether the grammar can derive the sentence. A full parser also has to record how the sentence can be derived. The implementation follows the extended algorithm so it can recover the alternatives while keeping a direct relationship to the productions in the expanded grammar.
To see what can be shared, consider a noun phrase that occupies the same token span in several complete trees. Every complete tree that uses the same internal analysis of that phrase can refer to a common structure for it. The full forest can also hold alternatives within the span. For example, a nonterminal at a given span can have several families of children, each representing a different way of deriving it. A family can itself refer to parts of the forest used elsewhere. The data structure is a shared packed parse forest, or SPPF.
The algorithm produces a binarized forest. The representation breaks derivational structure into combinations with at most two children at a time, retaining the information needed to trace those combinations to the grammar. Binarization here concerns the stored forest. The grammar writer can still use productions with longer sequences of symbols, and the recovered tree can be interpreted in terms of the original grammar after variant expansion.
The paper gives the worst-case time order of the Earley-based construction of the binarized forest as follows.
O(N³)
N is the sentence length, measured in tokens. The superscript ³ means that the length is cubed. O is asymptotic upper-bound notation, and the parentheses enclose the function that describes the bound. The bound describes how the worst-case construction cost can grow. It gives no particular running time for a sentence of a given length and no measured average for news.
Packing matters because a forest can encode many more trees than it has separate stored pieces. The authors describe a typical ambiguity factor of around 1.8, expressed in terms of sentence length as follows.
1.8ᴺ
1.8 is the paper's approximate typical ambiguity factor, and the superscript ᴺ means to raise that factor to the power N, the token count. The expression describes the approximate number of complete derivations in a typical case as characterized by the authors. Those derivations can reuse many of the same constituents. The estimate is about how many readings a forest represents, while the cubic time bound is about the work required to build its compact representation.
Score the alternatives from the words upward
A forest preserves the alternatives that are grammatical according to the rules. The applications described in the paper consume a chosen analysis, so the system ranks the forest after constructing it. At the bottom of the forest it scores each token's match to a terminal. The scores reflect the authors' judgments about which readings are more probable. The paper illustrates the choice with ekki, which can be an adverb meaning ‘not’ or a noun meaning ‘sob’. An adverbial match gets a higher score because it is the more usual reading.
Scores are added as a derivation combines its children into larger phrases. The grammar file can also give nonterminals adjustments through annotations called pragmas. Common constructions can receive positive adjustments, and exceptional constructions can receive negative ones. These scores let the authors favor a construction while keeping unusual derivations available for sentences that need them. A high score on a word reading contributes to the outcome only along derivations in which that reading actually fits.
When a nonterminal has several child families over the same span, the scorer compares their accumulated scores. It keeps the family with the highest score and prunes the others. Under ordinary additive scoring, a shared subtree can be ranked using its own evidence and reused wherever it occurs. At the sentence root, the winners on the route down the tree identify the selected analysis. The terminal matches on those surviving branches settle which part of speech and inflection the system assigns to each word.
Give prepositions the right scope for scoring
The authors treat the attachment of prepositional phrases as a special case. Consider Ég las blaðið í gær. On one reading, the speaker read the paper yesterday. On another, the paper being read was yesterday's paper. The phrase í gær can be related to the verb las or to the noun blaðið. This changes the interpretation while leaving the token sequence intact. The grammatical alternatives alone are insufficient to establish which interpretation was intended.
The system has a database of almost 7,300 verbs, which the authors augment with hand-written associations for prepositions commonly used with those verbs. The association includes the case governed by the preposition. For tala, ‘talk’, the paper gives við with an accusative object. When a prepositional phrase of that form occurs in a candidate verb phrase with tala, it can receive extra weight. This gives the scorer a reason to favor the verbal attachment when competing structures are also grammatical.
The preference creates a complication for sharing. A prepositional phrase can occupy the same span and have the same internal analysis in different derivations. In a packed forest those derivations can refer to the same node. Yet the scoring preference depends on the verb phrase enclosing that node. One occurrence may be in the scope of a verb with the listed association, while another may be attached to a noun or under a different verb. Reusing a single decision for the node would erase that distinction.
Before scoring, the parser makes a top-down pass that partially unpacks these parts of the forest. It clones the relevant prepositional-phrase nodes so that alternative parent families can have independent occurrences, up through the enclosing verb phrase. During scoring, the system keeps track of the current verb-phrase scope. It adjusts the preposition's score according to whether the association applies in that scope. The separate occurrences can then survive or be pruned independently.
This is where the architecture uses context beyond a phrase's own words for ranking. The grammar can supply both noun and verb attachments, and the lexical association can change which alternative is preferred. The authors use this mechanism as an approximation for a choice that sometimes requires knowing what a sentence means. Sharing remains useful elsewhere in the forest, where the same structure can be evaluated once and reused.
Turn internal trees into usable output
The full internal tree reflects the grammar's distinctions and the derivation the parser chose. For display and evaluation, the authors also use a simplified tree representation. Mapping rules convert from the internal categories and structures to the simplified scheme. This makes it possible to label recognizable units and functions in a reader-facing tree and to align the automatic output with independently annotated trees in the evaluation.
The paper illustrates the display with an Icelandic sentence reporting the arrest of Julian Assange and identifying him as the founder of Wikileaks. The figure displays part of the simplified tree, with labels that include the subject, a possessive phrase, and a verb phrase. This example connects the representation to the original extraction goal. The added phrase about the founder is part of a structural analysis around a person's name, giving the extraction system more to work with than a sequence of adjacent words.
The authors make the system available as a public Icelandic-language service and as the open-source ReynirPackage, written in Python 3 and C++. The service shows tree diagrams, highlights sentences without a parse, and displays details gathered from tokens and trees, including names with titles, definitions associated with named entities, and geographical references. It also accepts user-entered text for parsing and checking. These are demonstrations of the pipeline and its output. The experiments address the narrower questions of sentence coverage and agreement with human trees.
Experiments and results
Coverage in a large collection of news
The coverage test asks whether the current grammar yields a complete tree for a sentence. The input is the authors' database of 8.7 million sentences taken from news articles. About 90% have at least one derivation. Because this measure only asks whether a tree exists, it gives the same credit to a sentence with a single parse and to one whose forest contains many possible trees. The scores used to choose the final analysis do not make an uncovered sentence derivable.
The remaining 10% include several kinds of input. Some sentences are in languages other than Icelandic. Some material consists of poorly supported number-heavy formats, including sports results and tables. Some sentences have severe spelling or grammatical errors. The group also contains valid Icelandic sentences with constructions the grammar lacks. The paper does not give counts for these categories individually. The overall percentage is a measure of how the system handles the article stream it processes, with the mix of input that the authors encountered there.
The engineering scale behind that coverage comes partly from the expansion of the authored rules. In the full grammar the reported inventory includes over 5,600 nonterminals, 4,600 terminals and 19,000 productions. The paper also gives a controlled illustration in which the same noun-phrase fragment is counted before and after agreement expansion. The measured quantity in the chart is the number of productions in that fragment. These are counts of two representations of the same example, instead of a comparison of tree accuracy.
Production count before and after expansion in the noun-phrase example
Explicit agreement creates a separate set of productions for each feature combination.
The numbers
| System or setting | productions |
|---|---|
| Written fragment | 3 |
| Expanded fragment used by the parser (this paper) | 72 |
The higher count is a consequence of making each combination explicit for parsing. The small written fragment and the larger expanded one describe the same example with different degrees of repetition. The chart helps account for why the full system can have so many productions while its developers work in a substantially more compact notation.
The paper also gives one wall-clock example. On a quad-core Intel i7 server running GNU/Linux, the system needed slightly more than a second to parse, disambiguate, and process a typical news article of 22 sentences. The timing includes the operations named for that article. It gives an indication of the latency the developers observed, alongside a separate demonstration in which the public service refreshed its article collection every 30 minutes. Neither observation supplies a distribution of processing times across the corpus.
Comparing the chosen trees with human annotations
The accuracy evaluation starts with 80 randomly selected sentences from news articles. The authors hand-annotate them in a simplified bracketed scheme similar to the one used by the Penn Treebank. A bracket identifies a constituent covering a span of words, and the annotation gives the parts of the sentence that a human analysis groups together. This makes the human tree a reference for structural decisions such as where an embedded phrase begins and ends.
Spelling and grammar errors are corrected before the sentences are run through the parser. The automatic tree is then converted into the simplified scheme using mapping rules. This conversion matters because the internal tree records distinctions that serve the grammar and parser. The score is a comparison in the chosen annotation scheme, after conversion, rather than a direct count of every detail in the internal derivation. For a match, the automatic output must reproduce the reference bracket under the evaluation's representation.
The parser fails to derive a complete tree for two of the 80 sentences. The authors attribute those failures to syntactic structures absent from the grammar. The reported evalb results cover the other 78 sentences, for which the parser can return a tree to compare. This is a conditional evaluation of the selected structure once a sentence is covered. The paper reports the uncovered cases separately and does not fold them into the F-measure.
On those 78 sentences, recall is 71.15% and precision is 72.67%. Recall measures how much of the bracketed reference structure the output recovers. Precision measures how much of the structure proposed by the parser agrees with the reference. F-measure combines the two and is 71.90%. The paper also reports 4.18 for average crossing. Crossing brackets occur when the boundaries of an automatic constituent and a reference constituent overlap in a way that prevents either from being wholly contained in the other. This captures a kind of disagreement about how the sentence is divided into phrases.
The human annotations are the reference for these metrics. The paper does not report an accuracy baseline from another parser or a simpler version of the same system on this sample. IceParser appears in the account of related work, but its shallow output is not scored alongside these full trees. The results establish the measured agreement of one pipeline with the human analyses under the specified conversion and preprocessing.
What happened to words outside the lexicon
The authors also report lexical coverage for the evaluation material. Of 1,444 word tokens, 66 are outside the inflection database, a share reported as 4.6%. The decompounding procedure handles 35 of those 66 tokens. These counts describe occurrences in the sample and the operation of lexical lookup and recovery. They do not say that each occurrence corresponds to a different word or that a successful recovery necessarily fixes the parse containing it.
The count nevertheless shows the circumstances in which the compound handler was used. The full form was absent, and the system found a way to supply lexical information from a known component for some of those forms. For the accuracy measurement, a recovered reading still has to fit a derivation and survive scoring, and the resulting bracket structure has to agree with the reference. The paper gives the lexical count and the tree scores as different observations along that chain.
Where the automatic trees diverged
The authors find many errors in the attachment of prepositional phrases and subordinate clauses. An attachment chooses the larger phrase or clause to which a piece of the sentence belongs. If that choice is wrong, the parser can still recognize the words and correctly group the local phrase. The disagreement becomes visible in the boundaries and labels higher in the tree, where the constituent has been placed under a different parent.
Another reported pattern involves a noun phrase inside a deeper phrase or clause. The system sometimes assigns that noun phrase directly as the object of a verb in the main clause. The human analysis instead gives the verb a larger complement, such as a clause or prepositional phrase containing the noun phrase. The words of the noun phrase can still be recognized as a unit. The error is the scope of the object and the relation between the inner and outer structures.
A single attachment decision can affect several brackets. If a phrase moves under a different parent, some of the intervening constituents acquire different boundaries. An evaluation over brackets registers those changed constituents separately. This is why the architecture and the evaluation both give attachment such prominence. For an application trying to identify which verb a phrase belongs with, the original structural decision matters directly, even though its footprint in a bracket score can extend across several levels.
What the ablations show
The paper reports no formal ablation study and instead offers a worked agreement expansion, observations about lexical recovery and coverage, and a qualitative analysis of structural errors.
What the agreement example isolates
The noun-phrase example changes the representation while holding the agreement specification fixed. The compact fragment states which features the noun and determiner share. Its expansion lists productions for specific combinations. This gives direct evidence about what the notation does. A reader can see how a condition written once becomes a family of rules that the parser can apply without resolving a general feature expression at run time.
The example also helps locate the cost. The number of authored statements stays small in the example, while more grammar symbols and productions can arise when those statements are compiled into explicit variants. The paper reports the size of the complete expanded grammar and shows that it can be used on news. There is no matching experiment with agreement removed or implemented by another mechanism. The example establishes the expansion's behavior, while the coverage result applies to the full system in which that expansion is used.
What lexical recovery establishes
The reported OOV counts make it possible to distinguish a dictionary miss from a miss that the compound analyzer can handle. Recovery means the system can assign candidates using a suffix analysis after direct lookup has failed. The worked example and the count from the annotated sentences therefore answer complementary questions. One shows the linguistic basis for substituting a suffix's tags, and the other shows how often the routine handled an OOV token in that sample.
Determining the routine's contribution to tree accuracy would require comparing otherwise identical parses with and without it. The fallback for unfamiliar words already permits some sentences to proceed. As a consequence, some recoveries could change only the preferred reading, some might enable a new derivation, and others could make no difference to the selected tree. The experiment reports the number of tokens handled, without a breakdown into those situations. Its strongest claim is about how often the system obtained this particular source of lexical evidence.
What the attachment analysis establishes
The authors give a concrete reason for unpacking parts of the forest. If a prepositional phrase has the same internal structure under different parents, its score can still depend on which verb is in scope. The example with tala and við explains why a shared node needs separate occurrences in those derivations. This is an account of how to make the intended ranking rule operate correctly. It is more specific than saying that the parser consults a verb list, because it shows at what point the list must affect the representation.
The evaluation establishes that attachment remains a source of error with the mechanism in use. The paper does not report results with the verb associations switched off, with an alternative attachment heuristic, or with partial unpacking disabled. The examples can show how the mechanism could favor a particular structure. They cannot give the frequency with which it changes decisions in real news or the share of those changes that agree with a human analysis.
The error categories also expose an uncertainty about where improvement would come from. A wrong returned tree can arise because the intended derivation never entered the forest or because a competing derivation scored higher. The paper identifies why the uncovered evaluation sentences fail, but it does not assess every incorrect selected tree against all the alternatives in its forest. A count of reference structures available among those alternatives would help distinguish grammar coverage of the intended analyses from the quality of the scoring rule. The reported evaluation measures the top tree that the whole system returns.
What the runtime observation establishes
The timing for one article shows that the combined implementation can carry out all the relevant stages in the observed time on the named server. It does not measure the cost of each stage separately. In particular, the paper supplies neither a timing comparison with a parser that enumerates trees nor a memory comparison between different forest representations. The algorithmic argument for sharing comes from the structure of the search and the stated worst-case bound. The article timing shows an instance of the system operating at a speed the authors found usable.
Taken together, the analyses explain the roles of several design choices. Variants specify which feature combinations can occur. Lexical recovery supplies possible categories and inflections when direct lookup fails. Forest packing makes it possible to retain alternative derivations, and context-sensitive scoring can prefer some attachments after those derivations exist. The accuracy score belongs to the combined procedure. The study does not assign a measured share of that score to its individual components.
Limitations
Limits the authors identify
The authors describe the evaluation as preliminary and call the annotated sample small. Their reference collection for development grew gradually, and they were still working on a gold standard of parsed news for more precise evaluation. The 78 evaluated trees establish how the system performed on the covered part of this sample. The paper gives no evidence that the same level of agreement would hold across the full news database, where a human comparison at that scale was not carried out.
The authors identify incomplete syntactic coverage directly. Two hand-annotated sentences could not be parsed because their structures were missing from the grammar, and the large collection also contained valid Icelandic sentences the grammar did not yet handle. Other failures in that collection involved different languages, unsupported formats, or severe errors. There is no separate coverage figure for well-formed Icelandic sentences after those other categories are excluded.
The authors also acknowledge a limit of their attachment procedure. A preferred interpretation can depend on semantics, while their method uses common verb–preposition associations and the case of the preposition's object. The procedure makes a plausible attachment more likely when the association matches. Sentences such as the one about reading the paper illustrate why this evidence can leave the choice open. The reported errors show that attachment of prepositional phrases and clauses was still an active area of work.
Limits visible in the setup
Coverage and accuracy are measured on distinct input sets and at different points in the pipeline. In the large collection, returning any complete derivation counts as coverage. In the small test, the authors first correct spelling and grammar and then score the selected derivation only for sentences with a tree. A reader cannot combine those measurements into an estimate of how frequently the system gives an accurate full tree for an arbitrary raw sentence. Such an estimate would depend on a common evaluation set and on how failures to produce a tree were scored.
The reported metrics also depend on the simplified annotation scheme and the mapping into it. Some details needed by the internal grammar disappear or change during conversion. Agreement between simplified brackets therefore answers a particular question about constituent structure. It does not independently evaluate the final part-of-speech tags, the choice of lemma, every morphological feature, or every syntactic function. A system could agree on some phrase boundaries while choosing a different word reading inside them, or could disagree on brackets higher in the tree after recognizing a local phrase correctly.
The news domain matters for interpreting the tests. News articles drove iterative development, supplied the broad coverage collection, and provided sentences for hand annotation. This makes the evaluation relevant to the application's original input. The paper gives no comparable measurements for conversation, historical writing, or other kinds of Icelandic text. It also does not characterize how much the performance varies across the styles and formats within news. The results describe the domain sampled and the implementation examined there.
The manual nature of the grammar and scores leaves another question open. The system incorporates an inflection resource, repeated inspection of news output, a grammar developed over substantial effort, and hand-written lexical associations. Its success establishes that this combination can be built and used for Icelandic. The paper contains no comparison that controls for the availability of those resources in another language, or that establishes whether the same amount of work would lead to similar coverage elsewhere.
The timing example is tied to a single article and the named hardware. The paper describes why cubic worst-case behavior is compatible with a practical implementation, but it does not report scaling curves, peak memory figures, or the article lengths and structures that cause the most expensive cases. The example supports a claim of practical use in the demonstrated setting. It leaves the operational limits for much longer or more ambiguous inputs open.
Finally, the public service illustrates uses of extracted names, titles, and other facts and offers a way to check text. The experiments assess derivability and structure, without separate measures of extraction accuracy or successful correction. A parser can recover an application-relevant relation even when other brackets are wrong, or it can miss that relation in a tree that agrees well overall. Evidence about the application's own output is needed to determine which parsing errors matter most for that use.
What came after
From phrase structures to dependency data
The authors identify automatically analyzed text as a possible source of annotated corpora. Their trees describe phrase groupings, which include information about how phrases fit inside clauses. Dependency parsing describes sentence structure through relations between words. A corpus in that representation requires decisions about which word heads a phrase and how to label its relations to other words. The output of a constituency parser can supply structural evidence for those decisions, while the conversion remains a distinct task.
One later work that cites the grammar paper addresses the construction of a parallel Icelandic dependency treebank from raw text, with Universal Dependencies as its target representation. Its stated scope connects the starting problem of analyzing raw Icelandic text to the goal of creating a reusable set of dependency annotations. That is a concrete continuation of an application the authors name. The citation and title establish the subject of the later work. They do not establish which part of the grammar or parsing system the later project used, or how it arrived at its dependency analyses. Creating a Parallel Icelandic Dependency Treebank from Raw Text to Universal Dependencies
The connection helps distinguish two deliverables. In the grammar paper, the output of interest is a chosen phrase-structure tree, and the accuracy test compares it with a bracketed reference. In the later work, the stated deliverable is a parallel dependency treebank. Building such a resource asks for dependency decisions that the bracket evaluation does not score. The original F-measure consequently gives no direct estimate of the quality of the later treebank.
From identifying constructions to checking errors
The authors also propose extending the grammar with rules and parser configurations for constructions that signal common errors. This is a separate use of explicit syntax. Normal grammar rules let the parser assemble a well-formed structure, and specially annotated rules can give the checking system a way to recognize a particular problematic pattern. A parse failure alone is hard to interpret because the study finds that uncovered input can include valid Icelandic. A recognizable error construction can provide more specific evidence for grammatical error correction.
The other later work cites the grammar paper in developing an Icelandic spelling and grammar checker using an error corpus. Its stated contribution brings examples of errors into the checking task, an application the original paper explicitly identifies. The title establishes the corpus-based focus of the later work. The citation does not establish which grammar rules, parser components, or outputs it adopted, or which errors the checker could handle. Developing a Spell and Grammar Checker for Icelandic using an Error Corpus
The two later works pursue different outputs from the ones measured in the parsing study. One concerns producing a dependency-annotated resource, and the other concerns recognizing problems in text. In both cases, full-sentence analysis offers evidence that a downstream procedure can use. The quality of that procedure depends on decisions specific to its task, from identifying heads and relations in a treebank to deciding whether a construction warrants a correction.
Cite
Cite as Vilhjálmur Þorsteinsson, Hulda Óladóttir and Hrafn Loftsson. 2019. A Wide-Coverage Context-Free Grammar for Icelandic and an Accompanying Parsing System. Proceedings of the International Conference on Recent Advances in Natural Language Processing (RANLP 2019).
@inproceedings{thorsteinsson2019wide,
title = {{A Wide-Coverage Context-Free Grammar for Icelandic and an Accompanying Parsing System}},
author = {Vilhjálmur THorsteinsson, Hulda Óladóttir and Hrafn Loftsson},
booktitle = {Proceedings of the International Conference on Recent Advances in Natural Language Processing (RANLP 2019)},
year = {2019},
doi = {10.26615/978-954-452-056-4\_160},
url = {https://doi.org/10.26615/978-954-452-056-4_160}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/thorsteinsson-2019-wide-coverage-context-free-grammar/