Elamur Research

Udapi: Universal API for Universal Dependencies

Paper · 2017 · Martin Popel, Zdeněk Žabokrtský and Martin Vojtek

Summary

Removing a word from a syntactically annotated sentence can affect much more than the line that records it. Words that followed it may need new identifiers, and words that depended on it may need new attachments. As Universal Dependencies (UD) expanded, more people had to make edits like these to collections of annotated sentences, known as treebanks. The UDv2.0 release contained 70 treebanks across 50 languages, with 12M words contributed by 145 developers. The authors introduce Udapi, an open-source framework that gives developers and researchers a common way to work with these collections in their native CoNLL-U format.

Udapi presents an annotated sentence as a tree that programs can navigate and change. A document contains bundles, each of which can hold a sentence with several representations, such as alternative parses or translations. Each tree has an artificial root that gives access to sentence-wide information, and its ordinary nodes carry word attributes and dependency relations. Users can work with these objects directly in Python or assemble a sequence of processing steps with the udapy command-line interface. Python is the implementation emphasized in the paper. Perl and Java implementations follow the same design where their languages permit.

The paper demonstrates tree visualization in a terminal, in HTML, and through LaTeX output. It also shows format conversion, unrestricted Python queries, and edits ranging from a change to a relation label to migration between annotation conventions. A content checker flags suspicious analyses for review, while an integration with UDPipe performs tagging and parsing. Udapi can also score head attachments with unlabeled and labeled attachment scores, known as UAS and LAS. The authors report using its UDv2 conversion block on Bulgarian, Romanian, Galician, Russian, and Irish treebanks. A separate converter handles data for 15 languages in an earlier Google annotation style.

The performance benchmark uses cs-ud-train-l.conllu, a 68 MiB Czech training file from UDv1.2 containing 41k sentences and 800k words. All Udapi implementations used less memory and took less time to load, save, and run a mixed tree-editing workload than Treex and PyTreex. Udapi-Python loaded the file in 24 s and used 879 MiB, compared with 2,501 s and 18,024 MiB for Treex. These are measurements of framework operations on an existing treebank. The paper’s applications center on treebank developers, with students, linguists, and other researchers among the users the authors hoped to reach.

How Mova uses it

Effectiveness in Mova

Not measured separately. The head definition is a small but load-bearing convention: it determines which mentions count as matching in every reported coreference score (for example CoNLL F1 60.31 on GUM test with gold trees, without singletons). Following the shared-task tooling keeps Mova's numbers comparable in method to the CRAC evaluations.

Deep dive: Udapi: Universal API for Universal Dependencies

Udapi gives researchers a shared way to inspect, edit, convert, and evaluate Universal Dependencies treebanks, with a benchmark of speed and memory use. · about 31 minutes to read

The problem and its context

A shared format makes data easier to exchange

Universal Dependencies supplies guidelines for describing sentence structure across languages and distributes freely available treebanks that follow those guidelines. A dependency analysis gives each ordinary word a place in a syntactic structure by attaching it to a head and assigning a label that describes the relation. In a collection of sentences, the analyst can ask which words act as subjects, which words modify nouns, or how different annotations treat a similar construction. Such questions depend on the choices made in linguistic annotation.

CoNLL-U makes those choices accessible in text. Its columns store information about words and their relations, so a developer who wants to inspect a column or select lines with a particular value can frequently do so with a short script or a standard Unix utility. The authors take that accessibility as a starting point. A person working on a treebank can open the data, see how a value is stored, and make a targeted change without first building a large software system. A common format also means that the same kind of script may be applicable to different collections.

A tree edit reaches across columns and rows

The more demanding case is an operation whose meaning depends on several parts of the annotation. Consider deleting a node from the middle of a sentence. The position identifiers for subsequent words have to reflect their new order. Basic head references and references in the enhanced dependency column have to be brought into line with those identifiers. Enhanced links to the deleted node must be removed, and its dependents must be attached elsewhere or deleted. If the node belongs to a multiword token, the change also has to leave the token in a valid state. A script that deletes the intended row can still leave several of those relationships wrong.

This example explains why the authors distinguish a file operation from a tree operation. A treebank developer making a correction is thinking about the word to delete, what it governs, and what should become of those dependents. The details of how a file records the resulting structure matter, but handling them anew in every script makes it harder to see and review the linguistic decision. As the script grows, its author must maintain the code that implements the correction alongside the code that takes care of the representation. The paper also identifies speed and memory use as reasons why improvised solutions can discourage frequent experiments on large collections.

Growth in the amount of UD data put pressure on both sides of that problem. More treebanks meant more opportunities to apply the same operation to different data. A revision to the guidelines also meant that existing annotations needed to be interpreted and sometimes transformed. A shared naming convention makes some edits straightforward because the same value can be located across files. A change to the structure of an analysis takes more than naming conventions. It requires a way to find a configuration of connected words and revise those connections while preserving a usable tree.

What researchers already had

The authors place Udapi among tools with different starting points. Treex was a Perl framework oriented toward machine translation and multilayer annotation in the Prague Dependency Treebank style. According to the authors, this was the framework they were aware of that provided at least some support for UD and CoNLL-U. NLTK served Python users and teaching, and the paper reported that it had yet to support UD directly. GATE comprised Java tools for language processing and information retrieval, with a converter available for bringing CoNLL-U into GATE documents. The paper also describes an online editor with partial CoNLL-U support and identifies conllu.js as the JavaScript library behind embedded visualizations on the UD website. The editor is brat.

UD users already had online search services. SETS, from the University of Turku, and PML-TQ, from Charles University, let users query released treebanks. In the authors’ account, the SETS query language was easier to learn and expressed a narrower range of conditions than the PML-TQ language. Udapi approached querying through ordinary Python expressions with access to the objects and methods used for other forms of processing. That choice made it possible to express a search in the same terms as a subsequent edit. A condition could identify a particular dependency configuration, and another processing step could operate on the trees containing it.

The paper also distinguishes existing validation tools by the questions they answer. The official validate.py script checks whether a CoNLL-U file is valid and whether it follows restrictions specific to its treebank, such as the permitted subtypes of dependency relations. An online content service asks whether a structurally readable annotation contains patterns that merit inspection. A word can carry a legal relation label and still be assigned the wrong role in a sentence. A content test can bring that possibility to an annotator’s attention by looking at the label together with its neighbors or dependents.

Across these examples, the opportunity for Udapi lay in sharing the representation used by different operations. Reading a file, asking about a node, changing its parent, and drawing the updated tree can all happen around the same objects. A visualization tool, online query service, and format validator each address particular parts of the work the authors describe. Udapi’s proposal was to make many of those activities composable so that a researcher could move from inspecting data to processing it without repeatedly writing the machinery that connects the two.

The method, step by step

From a CoNLL-U file to an editable tree

The simplest way into Udapi is to follow a sentence. A reader turns its annotation into objects. A processing block can then visit a word, follow a link to its head, inspect the head’s children, or use an attribute such as the word’s surface form or part-of-speech category. A writer presents the resulting objects in a form suited to the next task. It might write another CoNLL-U file for further processing or draw trees for a person to inspect. The framework applies the same pattern when the input is plain text that first needs to be parsed.

How Udapi processes annotated sentences

The steps in order.

How Udapi processes annotated sentencesStep 1: Read sentence data into a document1. Read sentence data into a documentStep 2: Group sentence representations in bundles2. Group sentence representations in bundlesStep 3: Access each dependency tree through its root3. Access each dependency tree through its rootStep 4: Inspect or update nodes in successive blocks4. Inspect or update nodes in successive blocksStep 5: Write or visualize the resulting trees5. Write or visualize the resulting trees

The document tracks the sequence of sentence bundles. A document can be assembled from code as well as loaded from a CoNLL-U file. A bundle groups the representations that belong together at a sentence position. In the ordinary case it holds a single tree. The paper also describes bundles that group corresponding sentences in parallel text, paraphrases within a language, or alternative analyses produced by different parsers. When a bundle holds several trees, each is identified by a zone. The zone label contains the language code. Because one bundle can hold alternative analyses in the same language, identifying the tree and identifying its language are distinct tasks that the zone can accommodate.

Each tree is accessed through a Root object. It acts as an artificial node above the word nodes, has linear position 0, and carries tree-level information such as the sentence identifier. Its children and descendants can be visited like those of an ordinary node. Other operations belong at the root because they concern the sentence as a whole. The root gives access to CoNLL-U comments and multiword tokens and can compute the sentence as detokenized text. A lemma, the dictionary form associated with a word, belongs to a word node. The artificial root has no settable lemma.

The Node object provides access to the attributes on a CoNLL-U node. These include its form, the text assigned to the word, and its relation to its head. There are two ways to navigate from one node to another. Following a parent or a child moves along the syntactic analysis. Asking for the previous or next node moves through the sentence in word order. The distinction matters in sentences where the head of a word lies far from it in the text. It matters equally in an editing routine that wants to determine which words a node governs before deciding where they should appear.

The API also keeps the two kinds of change available separately. Assigning a new parent changes a syntactic link. An operation such as shift_after_node moves a node relative to another in the sentence. An operation such as shift_before_subtree uses the position of a larger dependency structure as the point of reference. The paper singles out the engineering required to iterate through the nodes in word order while allowing that order to change. An editor that visits a sentence from left to right can then use the same node objects when the order itself is part of the transformation.

A method can add a child with specified attributes. The paper illustrates this with the form was and the lemma be, showing how the attributes can be supplied together when the node is created. Removal has options as well. With rehang as the child-handling option, the removed node’s children are attached to its former parent. That behavior expresses one specific structural decision. A routine using it still has to decide whether the new attachments make sense for the annotation it is trying to correct. The API supplies the operation through which that decision takes effect.

Choosing and composing processing blocks

A block is a processing unit for a defined job. A reader, a tokenizer, and a writer can all be blocks, as can a routine that extracts information from annotations or changes their labels. The Run class represents the ordered collection of blocks that Udapi calls a scenario. It provides the machinery used by udapy. Python users can also work with Udapi as a library and access the underlying objects in their own programs.

The order is meaningful because each block receives data at the stage reached by the preceding blocks. A search earlier in a scenario can inspect original labels. The same search after a conversion will see the converted labels. A tree writer after a marking block can expose the nodes that the marking block selected. The components therefore support a chain in which a decision made about a tree becomes data that later components can use. This is what gives a short scenario room to include inspection, modification, and output without embedding all three in the same piece of code.

The command-line interface is one way to name the components and supply their parameters. Some choices have defaults. A scenario that reads annotated input can omit an explicit reader and use read.Conllu. A writer that normally displays a selected set of attributes can be asked to display a different set. The paper also provides shortcuts for common choices such as writing CoNLL-U or displaying a tree in a terminal. The common objects underneath those choices are important because a user can begin with a convenient display and later add a custom condition or edit to the same sequence.

The authors present two ways of supplying a small custom operation. A short expression can be passed to a general-purpose block. A more involved transformation can be written as its own Python module and used as a named block. Their example puts an editing class into the package’s block namespace so that it becomes available to udapy. The module gives the transformation a place to keep its own logic, while the rest of the scenario can continue to handle reading and writing. The paper recommends this arrangement when edits become complex enough to benefit from reuse and maintenance.

Parsing a sentence and displaying the result

The parsing example begins with a reader that accepts plain text with a sentence on each line. A simple tokenizer then breaks the input into units for processing. The English UDPipe block fills fields such as the universal part-of-speech category, lemma, and morphological features, then supplies the syntactic head and relation. A writer serializes the annotated sentences in CoNLL-U. Given the preceding tokenizer, the example sets tokenize=0 so UDPipe skips its internal tokenization. For ordinary use, the authors favor allowing UDPipe to tokenize the text itself. The underlying task of assigning the syntactic heads and relations is dependency parsing.

This example explains how the authors use the term pipeline. The text reader puts a sentence into the framework, tokenization determines the units to be annotated, and tagging and parsing populate fields on those units. Output comes after those operations, when the tree and attributes are available to serialize. The setting for tokenization changes which component supplies the units. It also shows the boundary between Udapi and UDPipe. Udapi organizes the data and the order of processing, with UDPipe providing the English tagging and parsing in the example.

An already annotated file can go from the reader straight to a visualization block. write.TextModeTrees draws the dependencies in a terminal and can display selected node attributes alongside the words. Its default selection includes the word form, universal part-of-speech category, and dependency relation. Color can draw attention to marked nodes, and the writer can render nonprojective structures. The authors use this display for quick inspection and describe comparing revisions in vimdiff. For a long input, they also describe searching the rendered text in a pager, including searches based on the displayed attributes.

The paper offers different outputs for inspection and publication. A static HTML rendering of the terminal-style tree can include marked annotation problems and aggregate counts. Another HTML writer uses JavaScript to draw trees in a traditional layout and offers tooltips, SVG export, and highlighting between words in the sentence and their nodes. In the parallel example, the display can also highlight alignments between nodes in different sentences. The paper illustrates that view with Czech and English material from CzEng converted to UD style. A separate writer produces LaTeX code through TikZ for putting a tree into a paper.

Asking structural questions and marking the evidence

A node-based query can inspect the relations between words as well as the values stored on the words themselves. The paper illustrates this with a search for nonprojectivity. In the kind of case the authors want users to recognize, a head and its dependent are separated in word order by material outside the head’s subtree. The test concerns how a syntactic link sits over the ordered sentence. Udapi exposes it through is_nonprojective(), which can serve as a condition when inspecting a node.

The condition and the treatment of the matches are separate choices. In one scenario the filter keeps a tree when a node satisfies the test and marks the matching node. The mark is recorded in the CoNLL-U MISC field, which can carry supplementary information about a node. In another scenario, a marking block marks nodes and the writer is configured to display only trees with marks. Both approaches can lead a reviewer to sentences that contain a nonprojective dependency while still showing which attachment prompted the selection. The surrounding sentence remains visible for interpreting the match.

util.Eval uses the same access to node objects for edits. The example in the paper drops relation subtypes. A label such as acl:relcl becomes acl by taking the universal part of the current label and assigning it back to the relation attribute. The change expresses a precise choice about granularity. A consumer that needs only universal relations can use the revised label, and the node still occupies the same place in the tree. The example also shows how little code a transformation can require when a named attribute already provides the needed part of the original label. The relation family is acl, the clausal modifier of a noun.

This combination of object access and Python expressions is the paper’s alternative to a dedicated query language. A condition can refer to methods for finding descendants or leaves, comparing positions, or reading attributes. A transformation can use those same methods to locate the places it intends to change. The paper’s examples use a short expression with a well-defined target. For a larger correction involving several dependent changes, a named block allows the author of the edit to keep the steps together and use them in more than one scenario.

Keeping annotation checks distinct

The official validator and Udapi’s loader serve different purposes. The validator checks compliance with CoNLL-U and treebank-specific restrictions. Udapi checks selected critical properties when it reads a file, such as whether the dependencies contain a cycle. A cycle would create a chain of head links that leads back to a node already visited. Checking for such problems protects basic tree processing. The paper explains that enforcing the full set of UD restrictions during loading would run against the aims of quick reads and support for collections with different permitted values in their part-of-speech and dependency fields.

Content checks are implemented as queries about potentially suspicious trees. The test called multi-obj examines the children of a node. It counts those whose dependency relations are obj or ccomp and flags the configuration when the count is greater than 1. A direct object and a clausal complement are different relation types, but for the purposes of this check both contribute to the condition being tested. The head provides the context that makes the query meaningful. Merely counting the labels across a whole sentence would answer a different question because the relevant children might attach to different words. The test uses the UD relations for objects and clausal complements.

ud.MarkBugs is the block that packages such content checks for offline use. The authors describe it as extending the online content validation with greater precision and coverage. Users can select checks to run or name checks to skip. A reviewer can then use the marks in a tree display and concentrate on test categories that occur often in a particular collection. The paper stresses that some matches can be permitted constructions, so a match identifies a case for review. Its illustrations give the reviewer both the flagged relation and the rest of the sentence, which helps in deciding whether an annotation has to change.

This workflow supports a particular kind of development cycle. A developer can run checks over material before publishing a revision or on test data kept private. The checked data can stay local while the results are inspected. The author of the scenario can change which tests to apply on a later pass. The output can also display attributes relevant to a specific suspected problem. The paper’s concern here is to make inspection possible over a collection and to bring the relevant trees to a human reviewer.

Changing formats, guidelines, and text

Changing the output format is the most direct use of a reader and writer in the same scenario. The paper shows routes between CoNLL-U and other formats, including VISL-cg and SDParse. It notes the association of SDParse with Stanford dependencies and brat. The CoNLL-U reader can also handle CoNLL-X and CoNLL-2007 when the user specifies which attributes the input columns represent. This is a case where the mapping is supplied during reading. The resulting objects are then available to later blocks in the usual way.

A change in guidelines can call for a different kind of conversion even when the input and output are both treebanks. During migration from UDv1 to UDv2, some values can simply be renamed. The paper gives the earlier tag CONJ and the new CCONJ as an example. Other changes require recognizing where a tree represents a construction using the earlier conventions and revising its analysis. Ellipsis, where some expected material is absent, is the authors’ example. The older remnant analysis and the newer orphan analysis call for different treatment of the structure. The conversion block is ud.Convert1to2, and the new relation is orphan.

The paper treats guideline conversion as an opportunity for partial automation. A block can apply a straightforward rename throughout a collection and encode structural transformations where the earlier annotation gives it enough evidence. ud.Google2ud addresses an additional starting point, an annotation style used by Google before UDv1. The existence of separate blocks reflects the different input conventions. A named conversion can package the assumptions about its input that a generic file reader has no reason to make.

Other blocks bring the annotations into agreement with the text that the words came from. ud.SetSpaceAfter adds SpaceAfter=No by heuristic rules. The attribute records that no space follows the relevant token. ud.SetSpaceAfterFromText can use the raw text to determine where the attribute belongs. ud.ComplyWithText can go further and change the annotation itself to make it correspond to the text. The paper points to treebanks that used TeX-style quotes in place of the original quotation marks or removed separators from numbers. Reversing such normalization can restore the surface forms required by the UDv2 guidelines.

A multiword token poses another representation problem. The raw text contains a token whose annotation needs to account for multiple syntactic words. ud.AddMwt can split such tokens into word entries according to language-specific rules. The paper names a Czech subclass as an example. The root’s access to multiword token objects and the node-level access to words serve different purposes in this operation. Keeping the distinction available in the API helps explain why edits to a word node can have consequences for a token that covers it.

Counting, scoring, and storing the data

Udapi includes blocks for measuring what is present in the material and for assessing predictions against a reference. util.Wc reports counts of items such as words, empty words, multiword tokens, and sentences. util.See reports statistics for nodes that match conditions involving other nodes. A word count answers a question about how much data is in a document. A conditional statistic can instead describe how frequently a particular configuration occurs, using relationships within the trees to decide what contributes to the count.

eval.Parsing computes UAS and LAS. The unlabeled attachment score concerns whether a predicted head agrees with the reference head. The labeled attachment score requires agreement on the relation label as well. eval.F1 evaluates selected attributes with precision, recall, and F1 using a longest common subsequence, which identifies shared material while preserving its order. The paper names the metrics and the basis of this latter comparison without giving mathematical derivations. It also includes blocks for projectivizing and reversing the projectivization of trees, citing Pseudo-Projective Dependency Parsing.

The implementation work behind these uses includes the storage of individual fields. Consider FEATS, the field for morphological features, and MISC, the field for additional information. In CoNLL-U, the content of each appears as a serialized string. A program making an edit might want to address a named feature inside that field as a dictionary entry. The field can also be assigned as a complete string. These interfaces are useful at different points in a scenario. A writer needs text, while an annotation edit may concern only a particular feature.

Udapi maintains both representations and synchronizes them lazily. In this context, that means bringing a representation up to date when it is needed. A change through the dictionary interface has to be reflected when the field is read as a string, and a new string has to be reflected when its individual values are accessed. The authors describe this mechanism alongside optimizations for loading CoNLL-U and traversing nodes in word order. They report that work on these data structures and performance-sensitive paths took substantially more effort than implementing the example applications. The open-source project’s development was hosted on GitHub, and the authors invited contributions.

Experiments and results

The file, the baselines, and the workload

The quantitative experiment is a framework benchmark using cs-ud-train-l.conllu from UDv1.2. The input is a Czech training file. On disk it occupies 68 MiB and contains 41k sentences and 800k words. The file’s training designation identifies its role in the treebank distribution. Here the authors use the existing annotations as input to software operations. Loading a treebank, changing its structures, and saving it are the tasks timed in the comparison.

The baselines are Treex and PyTreex. Treex uses Perl and PyTreex uses Python 2. The benchmark includes Udapi’s Python 3, Perl, and Java 8 implementations. Including the three makes it possible to see whether the reported advantage extends across the different Udapi implementations. The comparison also shows how much the Udapi versions differ from one another when applied to the same source file.

The reported measurements cover memory and three kinds of elapsed time. Loading measures reading the file from CoNLL-U. Saving measures writing to CoNLL-U. The mixed benchmark exercises the in-memory trees through traversal, attribute access and changes, edits to dependency structure, addition and removal of nodes, and changes to word order. The authors report one time for that sequence of operations. It gives a reading for a workload involving annotation manipulation in addition to the separate measurements of reading and writing the file.

CoNLL-U loading time on the UDv1.2 Czech training file

The Perl implementation loads the file fastest, and all Udapi implementations finish ahead of both baselines.

CoNLL-U loading time on the UDv1.2 Czech training fileTreex: 2,501Treex2,501PyTreex: 158PyTreex158Udapi-Python (this paper): 24Udapi-Python (this paper)24Udapi-Perl: 7Udapi-Perl7Udapi-Java: 9Udapi-Java9
The numbers
System or settings
Treex2,501
PyTreex158
Udapi-Python (this paper)24
Udapi-Perl7
Udapi-Java9

Udapi-Perl had the shortest load time at 7 s, followed by Udapi-Java at 9 s and Udapi-Python at 24 s. PyTreex loaded the same file in 158 s and Treex in 2,501 s. Python was the version used for the paper’s explanations of the API. Its position in the load results shows why the authors’ choice to emphasize it should be read alongside their account of support and usage. The timing comparison gives a different ordering among the implementations.

Framework memory use on the UDv1.2 Czech training file

Every Udapi implementation uses less memory than either baseline, with Udapi-Perl using the least.

Framework memory use on the UDv1.2 Czech training fileTreex: 18,024Treex18,024PyTreex: 3,809PyTreex3,809Udapi-Python (this paper): 879Udapi-Python (this paper)879Udapi-Perl: 748Udapi-Perl748Udapi-Java: 1,323Udapi-Java1,323
The numbers
System or settingMiB
Treex18,024
PyTreex3,809
Udapi-Python (this paper)879
Udapi-Perl748
Udapi-Java1,323

Memory use was lowest for Udapi-Perl at 748 MiB and next lowest for Udapi-Python at 879 MiB. Udapi-Java used 1,323 MiB. The two baselines used 3,809 MiB for PyTreex and 18,024 MiB for Treex. These are the reported framework memory measurements for processing the same input. The 68 MiB file size describes the serialized data on disk. In memory, the frameworks represent annotations through objects and structures that support operations on the treebank.

Mixed tree-processing time on the UDv1.2 Czech training file

Udapi-Java finishes the mixed workload fastest, followed by the Perl and Python implementations of Udapi.

Mixed tree-processing time on the UDv1.2 Czech training fileTreex: 287Treex287PyTreex: 74PyTreex74Udapi-Python (this paper): 16Udapi-Python (this paper)16Udapi-Perl: 11Udapi-Perl11Udapi-Java: 5Udapi-Java5
The numbers
System or settings
Treex287
PyTreex74
Udapi-Python (this paper)16
Udapi-Perl11
Udapi-Java5

The mixed workload took 5 s in Udapi-Java, 11 s in Udapi-Perl, and 16 s in Udapi-Python. PyTreex took 74 s and Treex took 287 s. Saving to CoNLL-U also favored Udapi-Java among the implementations tested. Saving the Czech data took 1 s with Udapi-Java, 3 s with Udapi-Perl, and 6 s with Udapi-Python. PyTreex took 8 s and Treex took 201 s. The order changes with the outcome measured. Perl led for loading and memory, while Java led for saving and the mixed operations.

What the examples establish in practice

The conversion examples report use on real collections. The authors say ud.Convert1to2 was used successfully for Bulgarian, Romanian, Galician, Russian, and Irish treebanks as they moved to UDv2. That gives the conversion example a wider scope than a demonstration on a single constructed sentence. The paper also reports that ud.Google2ud converts data for 15 languages from the Google style that predates UDv1. The language count describes the coverage of that converter, and the named treebanks describe projects on which the other conversion block was used.

Other demonstrations show particular outputs. The parallel CzEng example illustrates how a visualization can make word alignment visible while retaining the two dependency trees. The static HTML example shows how marked content-check results can be presented together with overall statistics. The parser example shows that a raw English sentence can pass through the scenario and emerge as annotated CoNLL-U. These demonstrations address whether the framework can combine the operations it describes. The benchmark separately measures how the implementations perform when loading, editing, and saving the Czech file.

The paper includes UAS and LAS as capabilities of an evaluation block. The numerical outcomes reported for the benchmark are time and memory use. A reader looking at the mixed benchmark can thus judge how quickly the implementation performed the described operations on the trees, while a reader interested in the correctness of particular head assignments has the parsing and annotation examples to interpret qualitatively.

What the ablations show

The paper reports no component ablations and instead offers a framework comparison on a shared file, separate timings for kinds of operations, and examples that examine the trees produced or flagged by particular blocks.

What changes when the workload changes

Separating loading, saving, and in-memory operations reveals differences that an overall time would conceal. In particular, Udapi-Perl led at loading yet Udapi-Java led on the mixed workload and on saving. Lowest memory use also went to Udapi-Perl. For a user who chooses among versions, the relevant comparison therefore depends on whether the work repeatedly reads a large collection, spends its time changing trees already in memory, or writes them back out. The paper supports those distinctions directly because it records each type of outcome separately.

The baseline comparison in Perl holds the broad choice of programming language in common between Treex and Udapi-Perl. The implementations still differ in their design, structures, and scope. The Python comparison involves both framework differences and different language versions. Across the reported columns, each Udapi implementation improves on both baselines, so the observed advantage appears across the implementations tested in this workload. An isolated test of which structure or optimization produced the gain would require comparing variants with those choices changed individually. The benchmark compares the implementations as complete systems.

The authors describe lazy synchronization of string and dictionary fields and mention the effort spent on loading and ordered traversal. Those descriptions help explain what kind of implementation work could affect the benchmark. They also show why a difference in the mixed operation time is difficult to attribute to a particular operation. Changing a feature, reattaching a node, and shifting a word exercise different parts of the interface. All contribute to the aggregate measurement, so the result gives their combined cost under the authors’ workload.

What the marked trees reveal

The content-check illustration provides a different kind of analysis. In one tree flagged by multi-obj, the authors identify friend as a vocative, a word used to address someone, with Linda as an appositional dependent that supplies identifying information about it. The diagnostic found a suspicious pattern among the existing attachments. The proposed correction involves interpreting the address construction and revising the tree so that its relations express that interpretation. The correction uses vocative and apposition.

In another marked tree, the authors identify it as a subject where the annotation treated it as an object. Both examples drew attention because of the same check on object and complement relations. Their remedies are different. Changing which relation describes the pronoun is a different operation from recognizing the address construction and attaching the name to the vocative. The paper also points out an erroneous nonprojective attachment involving the phrase On the one hand, which should attach to pressure. Seeing the whole tree helps the reviewer diagnose the problem behind the mark. The subject relation at issue is nsubj.

These examples support the authors’ description of content checking as a way to locate and interpret possible errors. The rule identifies an observable pattern and can direct attention to a problem even when the repair depends on a human judgment about sentence structure. Its value can differ by treebank because the authors allow that permitted constructions can sometimes match a test. Frequent hits give a reviewer a place to begin looking for a recurring annotation or conversion issue. The examples establish what happened in the illustrated cases, while the general behavior of the checker is described qualitatively.

Limitations

Limits the authors identify

The authors intentionally keep full format validation outside the loading path. Their reasons are the cost of validation during input and the desire to read treebanks whose annotation values differ from UD. Udapi can check essential structural conditions as it loads data. Compliance with all the restrictions of an official UD release remains a separate check. The distinction affects how to interpret a successful load. Being able to navigate or transform a tree in Udapi establishes that it could be read and processed, while conformance to the format and the treebank’s declared restrictions is the official validator’s task.

The authors explicitly allow for false alarms from content tests. A suspected configuration can occur in a sentence whose analysis is allowed by the guidelines. That makes the marks a way to prioritize manual attention. A treebank developer can look at a high-frequency test result, compare the implicated sentences, and determine whether the pattern reflects a genuine inconsistency. The authors provide examples where that procedure uncovers problems. A complete picture of how frequently the tests miss errors would need evidence beyond the inspected matches.

The migration discussion likewise allows for partial automation. The authors distinguish easy tag renaming from conversions that depend on the structure of an analysis, such as the new treatment of ellipsis. They report successful use for named treebanks and give a harder construction to explain why such a migration benefits from a tree-processing tool. The paper gives a more detailed account of the available operations than of how frequently automatic conversions require review or further annotation work.

The authors also identify the audience on which their applications were concentrated. Most examples support treebank development, including checks before publishing data, annotation conversion, and inspection of proposed corrections. Students, linguists, and researchers using existing treebanks are among the groups the authors hope to serve more directly. The interface is described with those wider possibilities in mind, but the demonstrated uses primarily answer the needs of people maintaining the annotations.

Limits of the evaluation

The benchmark uses one large training file from one treebank release. All frameworks encounter the same input, which supports a direct comparison on that file. A different collection could place a different balance of demands on the reader, storage structures, and edit operations. The experiment reports no measurements across collections with other patterns of annotation or different amounts of data. The evidence supports the reported ranking for the Czech input and workload instead of a general prediction for every language or scenario.

The table gives one value per framework and metric. It does not supply the spread across repeated runs or specify enough detail to translate the timings directly to another computing environment. Precision about the reported values therefore matters. For example, the paper identifies Udapi-Perl as the fastest at loading and Udapi-Java as the fastest on the mixed workload based on the displayed measurements. The stability of those rankings across repetitions and environments is a separate question for which the paper gives no measurements.

The mixed workload describes several operations, but the reported aggregate does not identify the contribution of each. A user primarily interested in changing word order cannot extract a dedicated timing for that operation from the table. Likewise, the paper’s description of lazy field synchronization does not quantify its effect on memory or elapsed time. The evidence supports a comparison between finished implementations under a combined workload. Estimating the cost of an individual API call, or the benefit of a single engineering choice, requires a differently instrumented measurement.

The baselines also have different histories and stated purposes. Treex’s documented orientation toward multilayer annotations is relevant when interpreting its memory and time measurements beside Udapi’s. The experiment asks how the frameworks perform on the listed CoNLL-U tasks. It does not measure the cost of providing equivalent capabilities across their broader uses. For a reader weighing how to process UD data, the comparison is directly relevant to the operations exercised. For a reader asking which design decision drove the improvement, the comparison leaves several differences in play together.

The paper offers no corpus-level precision or coverage figures for the comparison between ud.MarkBugs and the official online content checks. The marked examples explain why context and a reviewer matter. They cannot show how often a match is correct across collections or how many annotation errors survive the available tests. The same distinction applies to conversion. Use on the named treebanks documents that the block contributed to actual migrations. A quantitative estimate of the correctness of the resulting analyses would need a documented reference and a scoring procedure.

Finally, the paper describes scoring for parsing but reports no parsing scores for the English example. UAS and LAS are outputs that a user can obtain when evaluating suitable data. The performance table measures elapsed time and memory for framework operations. Those two threads answer different experimental questions. One concerns whether predicted attachments agree with a reference, and the other concerns how a framework handles trees that have already been represented as data.

What came after

Shared tasks and annotation alignment

The later citations span work on building, evaluating, and extending annotated language collections. The citation identifies a connection to Udapi, while the topic of each work gives the context in which that connection appears. The individual accounts below stay at the level of the documented research scope where the citation does not establish a particular software role.

The CoNLL 2017 shared task focused on multilingual parsing from raw text to Universal Dependencies. Its scope brings together the stages Udapi illustrates with its English parsing example. A sentence starts as text, acquires token boundaries and linguistic annotations, and ends with dependency structures in a shared representation. The shared task makes multilingual parsing the subject of evaluation, while the Udapi paper describes how such processing stages can be composed around treebank data. The documented connection is the citation in the CoNLL 2017 Shared Task on multilingual parsing.

The CoNLL 2018 shared task continued with multilingual parsing from raw text to UD. It provides another instance of the same end-to-end research setup in the citing work. The connection to Udapi’s subject is visible at the point where a raw input must become a syntactic analysis that can be worked with and assessed. Udapi makes reading, writing, and attachment scoring available as separate operations. The shared-task title establishes the wider evaluation problem, with no particular assignment of those operations to Udapi in the CoNLL 2018 Shared Task on multilingual parsing.

Another citing paper brings Universal Dependencies together with Universal Morphology. That pairing meets Udapi at the level of attributes that accompany a syntactic analysis. The Udapi paper’s feature example shows that morphological annotation can be accessed through individual named values or through the field that represents them in CoNLL-U. Work that brings UD and a morphological resource together is concerned with how annotations in adjacent representations relate. The later work’s stated scope establishes the pairing of the schemes, while the role of any specific Udapi conversion remains unspecified in Marrying Universal Dependencies and Universal Morphology.

Consistency across collections and work beyond syntax

A later study asks how to estimate part-of-speech annotation consistency across treebanks in the same language. Udapi’s content-check examples ask whether particular configurations in a treebank deserve closer inspection. The later study puts the comparison between collections themselves at the center of the question. Its focus on part-of-speech tags also identifies which part of the annotation is being compared. The citation places Udapi in the context of work that examines annotation consistency, with the study’s stated scope given in Estimating POS Annotation Consistency of Different Treebanks in a Language.

Universal Dependencies for Old Turkish applies the UD framework to Old Turkish. The paper belongs to the area most directly represented in Udapi’s original examples, the production and handling of language-specific treebanks under common guidelines. A treebank for another language extends the range of material in which shared representations can support inspection and processing. The documented link to Udapi is a citation, which leaves the specific construction or editing steps open in Universal Dependencies for Old Turkish.

The review of Universal Anaphora’s first three years cites Udapi from work concerned with anaphora. This concerns how expressions refer back to things already introduced or otherwise identifiable in context. That creates a different set of annotation questions from assigning a word its syntactic head. A citation from this area places tools for working with annotated sentences in the context of a neighboring effort to represent linguistic relations. The exact interaction with Udapi is unspecified in the account of Universal Anaphora’s first three years.

The later study of surprisal and information status cites Udapi in the course of asking how the predictability of an expression relates to its information status. The inquiry moves beyond the construction of a dependency treebank to a linguistic question about expectations and information in context. Its citation connects the research to Udapi without identifying a particular annotation field, conversion, or analysis performed by the framework. The research question is the documented point of departure for What does Surprisal have to do with Information Status?.

 Institutions

 Fields, topics and concepts

 Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksArts and Humanities · 17,959 worksLanguage and Linguistics · 17,789 works

 Topics 1Research subjects and languages the work is about.Universal Dependencies · 185 works

Cite

Cite as Martin Popel, Zdeněk Žabokrtský and Martin Vojtek. 2017. Udapi: Universal API for Universal Dependencies. Proceedings of the NoDaLiDa 2017 Workshop on Universal Dependencies (UDW 2017).

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

@inproceedings{popel2017udapi,
  title = {{Udapi: Universal API for Universal Dependencies}},
  author = {Martin Popel, Zdeněk Žabokrtský and Martin Vojtek},
  booktitle = {Proceedings of the NoDaLiDa 2017 Workshop on Universal Dependencies (UDW 2017)},
  year = {2017},
  url = {https://aclanthology.org/W17-0412/}
}

References

8 references, 3 of them with a card of ours. Each entry links to our card when we hold the work, else to OpenAlex and Google Scholar searches for it.

  1. Eduard Bejček, Eva Hajičová, Jan Hajič, Pavlína Jínová, Václava Kettnerová, Veronika Kolářová, Marie Mikulová, Jiří Mírovský, Anna Nedoluzhko, Jarmila Panevová, Lucie Poláková, Magda Ševčíková, Jan Štěpánek, and Šárka Zikánová. 2013. Prague Dependency Treebank 3.0. LINDAT/CLARIN digital libra… OpenAlex ↗ · Scholar ↗
  2. Steven Bird, Ewan Klein, and Edward Loper. 2009. Natural Language Processing with Python. O’Reilly Media, Inc., 1st edition. OpenAlex ↗ · Scholar ↗
  3. Ondřej Bojar, Ondřej Dušek, Tom Kocmi, Jindřich Libovický, Michal Novák, Martin Popel, Roman Sudarikov, and Dušan Variš. 2016. CzEng 1.6: Enlarged Czech-English Parallel Corpus with Processing Tools Dockered. In Petr Sojka, Aleš Horák, Ivan Kopeček, and Karel Pala, editors, Text, Speech, and Dia… OpenAlex ↗ · Scholar ↗
  4. Hamish Cunningham, Diana Maynard, Kalina Bontcheva, Valentin Tablan, Niraj Aswani, Ian Roberts, Genevieve Gorrell, Adam Funk, Angus Roberts, Danica Damljanovic, Thomas Heitz, Mark A. Greenwood, Horacio Saggion, Johann Petrak, Yaoyong Li, and Wim Peters. 2011. Text Processing with GATE (Version 6). OpenAlex ↗ · Scholar ↗
  5. Joakim Nivre and Jens Nilsson. 2005. Pseudo-projective dependency parsing. In Proceedings of the 43rd Annual Meeting on Association for Computational Linguistics, ACL ’05, pages 99–106, Stroudsburg, PA, USA. Association for Computational Linguistics.
  6. Martin Popel and Zdeněk Žabokrtský. 2010. TectoMT: modular NLP framework. Advances in Natural Language Processing, pages 293–304. OpenAlex ↗ · Scholar ↗
  7. Pontus Stenetorp, Sampo Pyysalo, Goran Topić, Tomoko Ohta, Sophia Ananiadou, and Jun’ichi Tsujii. 2012. brat: a web-based tool for nlp-assisted text annotation. In Proceedings of the Demonstrations at the 13th Conference of the European Chapter of the Association for Computational Linguistics, page…
  8. Milan Straka, Jan Hajič, and Jana Straková. 2016. UDPipe: trainable pipeline for processing CoNLL-U files performing tokenization, morphological analysis, pos tagging and parsing. In Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC’16), Paris, France, May…

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/popel-2017-udapi-universal-api-universal-dependencies/