AplikaceAplikace
Nastavení

This is an old revision of the document!


Syntactic analysis and syntactic tagging

Some of CNC's 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 stochastic program (parser), in this case the TurboParser program. This kind of annotation has a much lower 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 parent identification, i.e. UAS (unlabeled attachment score), is 88,48 %; the success rate of both parent and syntactic function identification, i.e. LAS (labeled attachment score), is 82.46%. 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 correnspond 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 indicidual 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.

Vyhledávání syntaktických struktur v KonTextu: syntaktické atributy

Pro prohlížení syntakticky anotovaných korpusů se obvykle používají speciální prohlížeče schopné zobrazit syntaktickou strukturu, například program TrEd. V prohlížeči KonTextu možnost zobrazovat syntaktickou strukturu není, lze ale vyhledávat slova a slovní spojení podle syntaktických parametrů. K tomu je každému tokenu přiřazeno několik atributů, některé další atributy jsou pak přiřazeny jen vybraným tokenům. Všechny syntaktické atributy jsou popsané v samostatném článku. Základní syntaktické atributy přiřazené všem tokenům jsou:

  • parent (číselný odkaz na pozici řídícího tokenu)
  • afun (syntaktická funkce)

Další atributy umožňují vyhledávat podle vlastností „rodiče“. U autosémantických slov lze vyhledávat i podle „efektivního rodiče“, což je nejbližší autosémantický rodič (či prarodič) daného slova. Ve výše uvedeném příkladu by tak slovu zříceninou, které je závislé přes koordinaci a předložku mezi na slovese převážet, byly přiřazeny následující atributy:

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"

V korpusu pak lze podle těchto atributů vyhledávat, např. lze vyhledat všechna substantiva v akuzativu se syntaktickou funkcí Obj závislá na slovese převážet: [afun="Obj" & tag="NN..4.*" & p_lemma="převážet"]

Nebo lze vyhledat všechna slova (syntaktická substantiva) v sedmém pádě s předložkou mezi závislá na slovese v infinitivu: [prep="mezi" & case="7" & ep_tag="Vf.*"].

Tomáš Jelínek