AplikaceAplikace
Nastavení

This is an old revision of the document!


Syntactic analysis and syntactic tagging

Some of CNC corpora (the first of which is SYN2015) are syntactically annotated, marking dependency relations between two words in a sentence and the analytical functions of individual words. This syntactic annotation is based on the principles of the analytical-layer annotation used in the Prague Dependency Treebank (PDT).

The system of syntactic annotation: the analytical layer of the Prague Dependency Treebank

The analytical layer of the PDT (PDT 2.0 following revisions 2.5 and 3.0) was chosen as the starting point for tagging the SYN2015 corpus for the following two reasons: firstly because of the intelligibility of the syntactic theory contained in the PDT, and secondly due to the availability of high-quality „manually“ tagged data. The dependency structure based on which the PDT is annotated is based on that of Vl. Šmilauer, and is therefore closely related to the „traditional“ Czech structure as it is taught is the majority of primary and secondary schools to this day, which makes it easily comprehensible for a large number of users. In addition, the PDT's analytical layer contains approximately 1.5 million words of high-quality syntactically annotated data, which can be used to train and test automatic syntactic annotation programs; such a vast quantity of manually annotated data is not contained in any other syntactically annotated corpus of the Czech language.

Automatic syntactic annotation: parsing

Syntactic annotation is done automatically, using a syntactic (parser). For the annotation of the SYN2015 corpus, the TurboParser was used, for SYN2020, a “neural” parser of the NeuroNLP2 tools was used. This kind of annotation has a much higher error rate than morphological annotation. Approximately 1/6 tokens are left without a correctly identified „parent“ or correctly matched syntactic function.
The success rate of parsing is measured as UAS (unlabeled attachment score), the rate of successful parent identification and LAS (labeled attachment score), the rate of successful identification of both parent and syntactic function. In the SYN2015 and SYN2020, these rates are as follows:

korpus UAS LAS
SYN2015 88,48 % 82,46 %
SYN2020 92,39 % 88,73 %

Therefore, although syntactic annotation can be used as an approximate guide for further language research, we must keep in mind that it is not entirely reliable. The error rate is higher for less common syntactic functions and constructions, whereas the most frequent functions in expected contexts have an error rate lower than 10%.

Syntactic dependency structure

In dependency-based syntactic annotation, each token is assigned one „parent“, i.e. another token on which the given token is dependent, or alternatively the „root“ of the sentence, an external parent representing the entire sentence (e.g. the predicate in the main clause is dependent on the sentence „root“). One syntactic tag is also assigned to each token. Syntactic tags partially correspond to the usual syntactic functions such as predicate (Pred), subject (Sb), attribute (Atr) etc., and partially they have auxiliary functions, most often assigned to synsemantic words (e.g. AuxP for prepositions) and punctuation marks (AuxK for punctuation marks at the end of a sentence).

Examples of syntactic structure

The syntactic structure of a sentence can be illustrated using the example Plavidlo bude převážet turisty mezi minaretem a zříceninou Janohrad v parku. The sentence is shown as a dependency tree, where the branches represent the dependency relations between the individual words. In the dependency tree, tokens with basic syntax functions are written in red, tokens with auxiliary functions are green and graphic symbols are yellow.

The technical root of the dependency tree (top left, with the sentence identifier) governs the predicate převážet (Pred) and final punctuation mark (AuxK). The predicate governs the subject Plavidlo (Sb) and object turisty (Obj). The auxiliary verb bude (AuxV) forms one verbal unit with the verb převážet, and it is therefore also depicted as being dependent on this node. Furthermore, the verb převážet also governs the coordinated prepositional phrase with a locative adverbial function mezi minaretem a zříceninou Janohrad. In PDT, on the level of surface syntax the preposition's function is to formally govern, so the verb převážet governs the preposition (AuxP), which in turn governs the representative of the coordinating relation, the conjunction a (Coord). Both coordinated nouns from the prepositional phrase minaretem a zříceninou are dependent on the coordination node (Adv_Co: Adv, i.e. adverbial function, is furnished with an additional component _Co, which indicates coordinated members). The noun zříceninou is further modified by the incongruent attribute Janohrad (Atr). The coordinating node (Coord) also governs the prepositional phrase v parku, which itself is not coordinated, but modifies both members of the coordination, i.e. both the word minaretem and the word zříceninou. Again, the preposition v (AuxP) is dependent on the governing member, and the noun parku with the attributive function (Atr) is in turn dependent on the preposition.

Searching KonText for syntactic structures: syntactic attributes

Searching in syntactically annotated corpora typically requires an interface specially designed to display the syntactic structure, for example the program TrEd. The KonText interface does not offer the option of viewing the syntactic structure, nonetheless it is possible to search for words and phrases according to syntactic parameters. For this purpose, each token is assigned several attributes, in addition to the smaller number of attributes which are assigned only to selected tokens. All syntactic attributes are described in a separate entry. The basic syntactic attributes assigned to all tokens are:

  • parent (numbered reference to the position of the governing token)
  • afun (syntactic function)

Other attributes allow us to search based on the „parent“ properties. In the case of autosemantic words we can search based on the „effective parent“, which is the given word's closest autosemantic parent (or grandparent). In the previously mentioned example, this would mean that the word zříceninou, which is dependent on the verb převážet by way of coordination and the preposition mezi, would be assigned the following attributes:

afun="Adv_Co";

parent="-1", p_tag="J^--------------", p_lemma="a", p_afun="Coord";

eparent="-5, "ep_tag="Vf--------------", ep_lemma="převážet", ep_afun="Pred";

prep="mezi"

The corpus allows us to search based on these attributes, e.g. a search for all nouns in the accusative case with the syntactic function Obj and dependent on the verb převážet would look like this: [afun="Obj" & tag="NN..4.*" & p_lemma="převážet"]

We can also search for all words (syntactic nouns) in the 7th case (instrumental) with the preposition mezi which are dependent on a verb in the infinitive: [prep="mezi" & case="7" & ep_tag="Vf.*"].

Tomáš Jelínek