-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAnnotationGuide.html
2085 lines (2045 loc) · 55.1 KB
/
AnnotationGuide.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 7.0.5" />
<style type="text/css">
/* Debug borders */
p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
/*
border: 1px solid red;
*/
}
body {
margin: 1em 5% 1em 5%;
}
a { color: blue; }
a:visited { color: fuchsia; }
em {
font-style: italic;
}
strong {
font-weight: bold;
}
tt {
color: navy;
}
h1, h2, h3, h4, h5, h6 {
color: #527bbd;
font-family: sans-serif;
margin-top: 1.2em;
margin-bottom: 0.5em;
line-height: 1.3;
}
h1 {
border-bottom: 2px solid silver;
}
h2 {
border-bottom: 2px solid silver;
padding-top: 0.5em;
}
div.sectionbody {
font-family: serif;
margin-left: 0;
}
hr {
border: 1px solid silver;
}
p {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
pre {
padding: 0;
margin: 0;
}
span#author {
color: #527bbd;
font-family: sans-serif;
font-weight: bold;
font-size: 1.2em;
}
span#email {
}
span#revision {
font-family: sans-serif;
}
div#footer {
font-family: sans-serif;
font-size: small;
border-top: 2px solid silver;
padding-top: 0.5em;
margin-top: 4.0em;
}
div#footer-text {
float: left;
padding-bottom: 0.5em;
}
div#footer-badges {
float: right;
padding-bottom: 0.5em;
}
div#preamble,
div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
margin-right: 10%;
margin-top: 1.5em;
margin-bottom: 1.5em;
}
div.admonitionblock {
margin-top: 2.5em;
margin-bottom: 2.5em;
}
div.content { /* Block element content. */
padding: 0;
}
/* Block element titles. */
div.title, caption.title {
font-family: sans-serif;
font-weight: bold;
text-align: left;
margin-top: 1.0em;
margin-bottom: 0.5em;
}
div.title + * {
margin-top: 0;
}
td div.title:first-child {
margin-top: 0.0em;
}
div.content div.title:first-child {
margin-top: 0.0em;
}
div.content + div.title {
margin-top: 0.0em;
}
div.sidebarblock > div.content {
background: #ffffee;
border: 1px solid silver;
padding: 0.5em;
}
div.listingblock > div.content {
border: 1px solid silver;
background: #f4f4f4;
padding: 0.5em;
}
div.quoteblock > div.content {
padding-left: 2.0em;
}
div.attribution {
text-align: right;
}
div.verseblock + div.attribution {
text-align: left;
}
div.admonitionblock .icon {
vertical-align: top;
font-size: 1.1em;
font-weight: bold;
text-decoration: underline;
color: #527bbd;
padding-right: 0.5em;
}
div.admonitionblock td.content {
padding-left: 0.5em;
border-left: 2px solid silver;
}
div.exampleblock > div.content {
border-left: 2px solid silver;
padding: 0.5em;
}
div.verseblock div.content {
white-space: pre;
}
div.imageblock div.content { padding-left: 0; }
div.imageblock img { border: 1px solid silver; }
span.image img { border-style: none; }
dl {
margin-top: 0.8em;
margin-bottom: 0.8em;
}
dt {
margin-top: 0.5em;
margin-bottom: 0;
font-style: italic;
}
dd > *:first-child {
margin-top: 0;
}
ul, ol {
list-style-position: outside;
}
ol.olist2 {
list-style-type: lower-alpha;
}
div.tableblock > table {
border: 3px solid #527bbd;
}
thead {
font-family: sans-serif;
font-weight: bold;
}
tfoot {
font-weight: bold;
}
div.hlist {
margin-top: 0.8em;
margin-bottom: 0.8em;
}
td.hlist1 {
vertical-align: top;
font-style: italic;
padding-right: 0.8em;
}
td.hlist2 {
vertical-align: top;
}
@media print {
div#footer-badges { display: none; }
}
/* Workarounds for IE6's broken and incomplete CSS2. */
div.sidebar-content {
background: #ffffee;
border: 1px solid silver;
padding: 0.5em;
}
div.sidebar-title, div.image-title {
font-family: sans-serif;
font-weight: bold;
margin-top: 0.0em;
margin-bottom: 0.5em;
}
div.listingblock div.content {
border: 1px solid silver;
background: #f4f4f4;
padding: 0.5em;
}
div.quoteblock-content {
padding-left: 2.0em;
}
div.exampleblock-content {
border-left: 2px solid silver;
padding-left: 0.5em;
}
</style>
<title>Manual for syntactic annotators</title>
</head>
<body>
<div id="header">
<h1>Manual for syntactic annotators</h1>
</div>
<h3>Authors</h3>
<p>Bart Cramer <[email protected]></p>
<p>Gertjan van Noord <[email protected]></p>
<h2>Introduction</h2>
<div class="sectionbody">
<p>This document gives an overview of the Alpino system and related
software. Together, these programs can be used to annotate a corpus of
Dutch sentences syntactically. We will not discuss the specific rules
of syntactic annotation itself; for this we refer to the CGN
document. Alpino itself is a parser which uses linguistic knowledge
and various heuristics to construct appropriate linguistic structures
of Dutch sentences.</p>
<h3>Starting Alpino</h3>
<p>Alpino is the tool that we use for interactive annotation.
Before using Alpino, make sure that Alpino is properly installed on
your machine. Please consult a local wizard for this. The Alpino
program itself can be started with the command:</p>
<div class="listingblock">
<div class="content">
<pre><tt>Alpino</tt></pre>
</div></div>
<p>The command can take very many options. However, for annotation, there
is a specialized script, called Annotate, that we normally use for the
specific purpose of annotating. It requires an argument which
indicates which suite (a named collection of sentences) you want to
annotate.</p>
<div class="listingblock">
<div class="content">
<pre><tt>Annotate NameOfSuite</tt></pre>
</div></div>
<p>Annotate can take all the options that Alpino knows about, but these
options are placed <strong>after</strong> the name of the suite.</p>
<p>The Annotate script has some particular assumptions about the
directory structure that you are working in. You are advised to
construct a new directory for the purpose of annotation. Perhaps this
directory is called <tt>DCOI</tt> or <tt>LASSY</tt> or <tt>ALPINO</tt> or some such. In
this directory, there ought to be two sub-directories called <tt>Suites</tt>
and <tt>Treebank</tt> respectively. In the <tt>Suites</tt>-directory you will
collect the files (called <tt>suites</tt>) that you need to annotate. The
annotations will be placed in the directory <tt>Treebank</tt>. The <tt>Annotate</tt>
script will create a sub-directory in <tt>Treebank</tt> for each suite that
you annotate.</p>
<h3>File format of suites</h3>
<p>In the directory <tt>Suites</tt> you need to place the sets of sentences that
are to be annotated. Each such a set is called a suite. Such a set of
sentences is placed in a file ending with the extension <tt>.sents</tt>.
Although one is free to use any name for the suites, there should be
no dots in the filenames (e.g. <tt>1.1.1.2.Thesis.txt.tok.pl</tt>), as these
will confuse Alpino. For instance, you might create the file
my_corpus.sents containing the following lines:</p>
<div class="listingblock">
<div class="content">
<pre><tt>1|De zon komt op boven de stortplaats van het stadje Merlijn .
2|Er klinkt een zacht geluid .
3|Lila het vosje spitst de oren .
4|Ze probeert erachter te komen waar het geluid vandaan komt .
5|Nee , het is geen vogel .</tt></pre>
</div></div>
<p>Every line contains a key, a vertical bar, and the tokens of the
sentence, separated by space. Note that the sentences are assumed to
be tokenized here already: punctuation symbols are treated as separate
tokens and therefore seperated by spaces as well. There are various
tools in the Alpino software suite for tokenizing texts into this
format, but here we assume that you have been given files such as
those already.</p>
<p>The keys (whatever is placed to the left of the vertical bar | on each
line) can be arbitrary strings, and are used to identify each
sentence. Later, the file name containing the annotation of each
sentence will use this key.</p>
<p>If you have the correct <tt>Makefile</tt> in the Suites directory, you can give
compile the corpus into a format readable by Alpino. We use the <tt>make'
program to create the compiled corpus. The `make' program requires a
file called `Makefile</tt> which should contain the following definition:</p>
<div class="listingblock">
<div class="content">
<pre><tt>%.pl : %.sents
echo ":- module(suite,[ sentence/2 ])." > $*.pl
echo >> $*.pl
cat $*.sents | grep .|\
sed -e "s/| /|/" \
-e "s/ *$$//" \
-e "s/\\\\/\\\\\\\\/g" \
-e "s/'/\\\\'/g" \
-e "s/ /','/g" |\
awk -F\| ' !/^(%|--)/ {\
printf("sentence(%c%s%c,[%c%s%c]).\n",39,$$1,39,39,$$2,39); N++;}' |\
sicstus -l $(ALPINO_HOME)/Suites/echo >>$*.pl</tt></pre>
</div></div>
<p>Don't worry about the details of this unreadable definition. It is
meant to treat white space, quotes etc, in a way so as not to confuse
Prolog (Alpino is implemented in Prolog). You can copy a file with
this definition from the Alpino distribution:</p>
<div class="listingblock">
<div class="content">
<pre><tt>cp $ALPINO_HOME/Makefile.suite Makefile</tt></pre>
</div></div>
<p>You can now use this Makefile in order to create the Prolog version of
the suite:</p>
<div class="listingblock">
<div class="content">
<pre><tt>make my_corpus.pl</tt></pre>
</div></div>
<p>If all goes well, you now have the file my_corpus.pl which looks as
follows:</p>
<div class="listingblock">
<div class="content">
<pre><tt>:- module(suite,[ sentence/2 ]).
sentence('1',['De',zon,komt,op,boven,de,stortplaats,van,het,stadje,'Merlijn','.']).
sentence('2',['Er',klinkt,een,zacht,geluid,'.']).
sentence('3',['Lila',het,vosje,spitst,de,oren,'.']).
sentence('4',['Ze',probeert,erachter,te,komen,waar,het,geluid,vandaan,komt,'.']).
sentence('5',['Nee',',',het,is,geen,vogel,'.']).</tt></pre>
</div></div>
<p>If you need to change the <tt>suites</tt> file, then you should repeat the
<tt>make</tt> compilation step, in order that the changes are also propagated
to the compiled version of the suite.</p>
<h3>File format of annotations</h3>
<p>The annotations are placed in the Treebank subdirectory. Because each
sentence gets its own file, a new subdirectory is needed for each
suite. In there, the annotation of a sentence is saved as an xml-file,
example <tt>Treebank/my_corpus/2.xml</tt> (Of course, if you haven't done any
annotations yet, then there will not be any .xml files in your
directory). This file could look as follows:</p>
<div class="listingblock">
<div class="content">
<pre><tt><?xml version="1.0" encoding="ISO-8859-1"?>
<alpino_ds version="1.0">
<node id="0" rel="top" cat="top" begin="0" end="6">
<node id="1" rel="--" cat="smain" begin="0" end="5">
<node id="2" rel="mod" pos="adv" begin="0" end="1" root="er" word="Er"/>
<node id="3" rel="hd" pos="verb" begin="1" end="2" root="klink" word="klinkt"/>
<node id="4" rel="su" cat="np" begin="2" end="5">
<node id="5" rel="det" pos="det" begin="2" end="3" root="een" word="een"/>
<node id="6" rel="mod" pos="adj" begin="3" end="4" root="zacht" word="zacht"/>
<node id="7" rel="hd" pos="noun" begin="4" end="5" root="geluid" word="geluid"/>
</node>
</node>
<node id="8" rel="--" pos="punct" begin="5" end="6" root="." word="."/>
</node>
<sentence>Er klinkt een zacht geluid .</sentence>
</alpino_ds></tt></pre>
</div></div>
<p>There are various programs closely related to treebanks: <tt>dtview</tt>, <tt>dtedit</tt> (also
known as Thistle), <tt>dtchecks</tt>, <tt>dtsearch</tt> and <tt>dttred</tt>.</p>
<p>You can use dtview to display annotated sentences graphically. The
<tt>dtview</tt> program has a rather intuitive interface, but there are a few
short keyboard command that makes going through treebank a bit less
damaging for your wrist: Page Up and Page Down for going to the next
and previous tree, and the arrow keys for navigating in trees that
don't fit on the screen. The <em>t</em> key triggers the same response as the
<em>TrEd</em> button on the top, namely opening <tt>dttred</tt> for that
particular tree. Here, you can edit the tree.</p>
<p><tt>dtchecks</tt> is used for a superficial check on a treebank. Its syntax is
<tt>dtchecks directory</tt>, to be run from the Treebank directory, and it is able to
recognize errors like a node with only one child and incompatible
sisters/children/parents. Annotators produce these flaws rather often, so
before rounding off a corpus, you must use it. However, note that the dtchecks
program might also complain about valid annotations.</p>
<p><tt>dtsearch</tt> is a program that permits the user to search for trees in the
treebank with certain criteria. By standard, it does it recursively in all
subdirectories. After having retrieved the correct XML files, <tt>dtsearch</tt> will
show them in dtview (if you use the -v option). For example, if you would like
to find all trees in which <em>zoals</em> occurs as a preposition, you can issue the
command:</p>
<div class="listingblock">
<div class="content">
<pre><tt>dtsearch -v '//node[@word="zoals" and @pos="prep"]' .</tt></pre>
</div></div>
<p>The dtsearch program has a very powerful query language (known as
XPATH), that is documented elsewhere.</p>
<h3>A simple example of the annotation process</h3>
<p>To see the system at work, let's try to see the procedure from the
start until the end. First, make a Suite and a Treebank directory, and
create or copy an example suite in your Suite directory, and compile
that suite into Prolog format. Let's assume the suite is called <tt>my_corpus</tt>.
Then, issue the command</p>
<div class="listingblock">
<div class="content">
<pre><tt>Annotate my_corpus</tt></pre>
</div></div>
<p>from your current directory (that should now contain the Suites and
Treebank sub-directories).</p>
<p>Alpino starts up its graphical environment. On the top you will see a
series of menu buttons, which we will ignore for now (although it is
perhaps useful to know that you can stop the system by selecting the
File menu, and clicking the Halt item in that menu).</p>
<p>Below the menu buttons you see the <tt>Parse</tt> button on the left, with an
empty long space to its right, followed by a shorter space at the
right hand side. Once we have selected a sentence, the sentence will
appear in this space, with its key displayed further to the right. You can try
parsing a sentence by selecting it from the list box below the
<tt>Parse</tt>-button, followed by pressing that <tt>Parse</tt>-button.</p>
<p>Before Alpino really starts parsing the sentence, it presents a new
widget with the lexical analysis of the sentence. At this point, you
can influence the lexical analysis phase of Alpino, but for now we
simply click the Parse button (left below) on this new widget, to
really get going. Below, the lexical analysis phase is explained in
more detail (you can also swith off the interactive lexical assignment
using the option <tt>interactive_lexical_analysis=off</tt>).</p>
<p>Alpino will now (finally!) parse the sentence syntactically, and it
will show you the most probable analysis in the left
pane. For each analysis, a green button with the number of the
analysis is constructed as well.
As a short-cut, clicking on such a numbered analysis button with your
right mouse button will immediately display the corresponding
dependency structure of that analysis. A left-click on the number
will give you a menu, with which you can, for example, save your parse. If you
select <em>XML</em> -> <em>Save</em>, Alpino will automatically create the needed
file in the corresponding subdirectory of the Treebank folder. If the
correct annotation is not available, you can select <em>XML</em> -> <em>Save and
Edit</em>, to start the editor for this annotation. There are many more
options, some of which are useful. Please experiment.</p>
<h3>Options</h3>
<p>In Alpino, there are a lot of options available. Some options have a
quality/computational time trade-off. The following are the most
important:</p>
<ul>
<li>
<p>
number_analyses. This sets the maximum number of analyses the parser will
produce. The <tt>-fast</tt> option at start-up sets this option to 1. Unless dealing
with very complex sentences, it is recommended to set this option to some
small integer. If you increase this number, you should also increase the value
of the `disambiguation_beam' flag to the same number. The special
value <em>0</em> indicates that <strong>all</strong> analyses are produced.
</p>
</li>
<li>
<p>
interactive_lexical_analysis. If turned on, it gives the user the
possibility to adjust the suggested POS-tagging. When manually annotating, it
is highly recommended to keep this on.
</p>
</li>
<li>
<p>
fast. Using this option has a number of consequences. First of all,
the POS-tagger is switched on the reduce lexical
ambiguities. Furthermore, an efficient search algorithm is used to
select the best parse. In this case, only the best parse is
produced.
</p>
</li>
<li>
<p>
slow. This is the alternative to <tt>fast</tt> (you guessed!). The
POS-tagger is switched off, and all possible analyses are produced. This
is only useful for shorter sentences.
</p>
</li>
</ul>
<h3>Tips and tricks</h3>
<p>Next to the general way of parsing sentences, there are a number of manual
tricks available, which can help a great deal in improving the quality of the
parses or in speeding up the parsing process.</p>
<ul>
<li>
<p>
A large part of the computational time is spent on finding the correct
constituents. The annotator can give hints to Alpino about this by putting
straight brackets around constituents. Both brackets should be surrounded by a
single space on both sides otherwise the POS-tagging will give problems,
regarding a space as a word. This is a nice feature especially for attaching
modifiers at the correct location, enumerations and complex nestings in syntactic
structures. Brackets are normally associated with a category name, using
the @-operator. Normal syntactic symbols can be used here as @np, @pp
etc. Examples:
</p>
</li>
</ul>
<div class="listingblock">
<div class="content">
<pre><tt>Hij fietst [ @pp op zijn gemakje ] [ door de straten van De Baarsjes ] .
FNB zet teksten van [ [ kranten en tijdschriften ] , boeken , [ studie- en vaklectuur ] , bladmuziek , folders , brochures ] om in gesproken vorm .
[ @np De conferentie die betrekking heeft op ondersteunende technologie voor gehandicapten in het algemeen ] , bood [ @np een goed platform [ om duidelijk te maken hoe uitgevers zelf toegankelijke structuren in hun informatie kunnen aanbrengen ] ] .</tt></pre>
</div></div>
<ul>
<li>
<p>
You can also force a lexical assingment to a token or a series of
tokens, if the Alpino lexicon does not contain the proper assignment.
A @postag followed by an Alpino lexical category will force the
assignment of the corresonding lexical category to the words contained
in the brackets. This comes in handy when a part of the sentence is
written in a foreign language or a spelling mistake has occurred. Of
course, it may need adjusting with the editor afterwards.
</p>
</li>
</ul>
<div class="listingblock">
<div class="content">
<pre><tt>Hij heeft een beetje [ @postag adjective(no_e(adv)) curly ] haar .
Op een [ @postag adjective(e) mgooie ] dag gingen ze fietsen .
Mijn [ @postag noun(de,count,sg) body mass index ] laat te wensen over .</tt></pre>
</div></div>
<ul>
<li>
<p>
Also, if the annotator can predict that a certain token or series of
tokens will make the annotation a mess, it can be skipped by
@skip. In such a case, the sentence is parsed as if the word(s) that
are marked with <tt>skip</tt> where not there, except that the numbering of
the words in the resulting dependency structure is still correct.
Clearly, in many cases an additional editing phase is required to
obtain the fully correct analysis, but this method might reduce
efforts considerably.
</p>
</li>
</ul>
<div class="listingblock">
<div class="content">
<pre><tt>Ik wil [ @skip ??? ] naar huis
Ten opzichte [ @skip echter ] van deze bezwaren willen wij ....</tt></pre>
</div></div>
<ul>
<li>
<p>
A related trick that is useful in particular cases, is to add a word
to the sentence in order to ensure that the parse can succeed, but
instruct Alpino that this word should not be part of the resulting
dependency structures. Such words are labeled phantom as follows:
</p>
</li>
</ul>
<div class="listingblock">
<div class="content">
<pre><tt>Ik aanbad [ @phantom hem ] dagelijks in de kerk
Ik kocht boeken en Piet [ @phantom kocht ] platen
Ik heb [ @phantom meer ] boeken gezien dan hem</tt></pre>
</div></div>
<p>Limitations: a phantom bracketed string can only contain a single
word. The technique does not work yet for words that are part of a
multi-word unit.</p>
<p>Warning: the resulting dependency structure is most likely not well-formed
and often needs manual editing.</p>
<ul>
<li>
<p>
After annotating a sentence, it might turn out that you used
insufficient or incorrect brackets to get to the right annotation. In
this case, you may not want to re-do the interactive lexical
assignment. Middle-clicking <em>Parse</em> will parse the sentence, using the
lexical assigment of the previous try.
</p>
</li>
<li>
<p>
In the right bottom of the Alpino screen, there are two extra
buttons. <em>Annotate shortest</em> is particularly useful for beginning annotators:
this button will start to annotate the shortest yet unparsed sentence in the
corpus. <em>Annotate next</em> does what the name suggests it does: it annotates the
first sentence in the corpus that is still unparsed. This is a nice feature to
check whether you didn't forget a sentence in the corpus. As a
short-cut, clicking the now familiar <tt>Parse</tt> button with your
rightmost mouse-button has a similar effect by selecting the next
sentence to be annotated.
</p>
</li>
<li>
<p>
Sometimes you would like to check if a sentence is already done, or you would
like to look back at previous sentences to ensure coherence between
sentences. For this, you can use the <em>Treebank</em> button; this will activate the
<tt>dtview</tt> program on the analysis of the current sentence.
</p>
</li>
<li>
<p>
There is a small bug in Alpino: when it is being used for a long time, the
canvas for drawing the trees is full, and these drawings will render the newly
generated trees unreadable. You can clear the canvas by clicking
on it with the rightmost mouse button.
</p>
</li>
<li>
<p>
Although most work is done in the graphical interface, some things can only
be done in the Prolog interpreter screen (the terminal). One of the most used
options is to quickly check the possible POS-tags of a word form. This can be
done with the command <em>mlex word</em>. Quickly retrieving the parse of one
sentence can be done as well, using the <em>*</em> command. Quitting from the
terminal mode is done with the command <em>quit</em> (without a period, as is
expected in a Prolog environment). Also, <tt>sen 1130</tt> retrieves sentence 1130
from the corpus.
</p>
</li>
</ul>
<div class="listingblock">
<div class="content">
<pre><tt>1 |: mlex dreun
stem string his cat
dreun [dreun] normal noun(de,count,sg)
dreun [dreun] normal verb(hebben,sg1,intransitive)
dreun [dreun] normal verb(hebben,sg1,sbar)
dreun_na [dreun] normal verb(hebben,sg1,part_intransitive(na))
dreun_op [dreun] normal verb(hebben,sg1,part_sbar(op))
dreun_op [dreun] normal verb(hebben,sg1,part_transitive(op))
2 |: * De beer is los
top_features=grammar
parse: De beer is los
Lexical analysis: 4 words, 243 -> 8 -> 8 -> 8 tags, 42 signs, 170 msec
Parsed (70 msec)
created object: 1
[De beer is los]
Q#undefined|De beer is los|1|1|-0.05113238180000002
created object: 2
[De beer is los]
Q#undefined-2|De beer is los|1|1|-0.02903353880000002
cputime total 260 msec
Found 2 solution(s)
32 history items
top=top
|
-- =smain
_____________________
| | |
su=np hd=verb predc=adj
________
| | | |
det=det hd=noun ben los
| |
de beer
3 |: quit
cramer@rana:~></tt></pre>
</div></div>
<ul>
<li>
<p>
Rather than using the [ @postag ] technique described above, it
might be that a certain corpus has multiple occurrences of a word
that Alpino does not know about. In that case, you can add the word to the
lexicon interactively (it remains in the lexicon for this particular
session of Alpino only). Using the command interpreter, the command:
</p>
</li>
</ul>
<div class="listingblock">
<div class="content">
<pre><tt>add_lex curly mooi</tt></pre>
</div></div>
<p>tells the Alpino lexicon that the word <tt>curly</tt> has the same lexical
categories as the word <tt>mooi</tt>. It also works for multiple word units:</p>
<div class="listingblock">
<div class="content">
<pre><tt>add_lex body mass index index</tt></pre>
</div></div>
</div>
<h2>POS-tagging</h2>
<div class="sectionbody">
<p>One very important step in syntactic annotation is POS-tagging: determining
which word group a word belongs to. Having precise knowledge about these
categories can speed up the annotation process considerably, because then you
are able to prune large parts of the search space manually.</p>
<p>Almost all words have several POS-tags. A word can be ambiguous
because it belongs to different main categories (<em>werk</em> can be either
a verb or a noun), but also because they differ in details (<em>geven</em>
can be either intransitive, transitive or ditransitive, some words
have other complements as verb phrases, etc.).</p>
<p>In this documents, the main categories and the most frequently used
options will be reviewed, as these are most important for the normal
user. The very details of some exotic words will thus be left out.</p>
<h3>Verbs</h3>
<p>The tag of verbs takes at least three arguments:</p>
<ul>
<li>
<p>
The auxiliary verb, when the verb is inflected to a participium (<em>hebben</em> or <em>zijn</em>);
</p>
</li>
<li>
<p>
The tense and congruent information (<em>sg1</em>, <em>sg3</em>, <em>pl</em>, <em>past(sg)</em>,
<em>past(pl)</em>, <em>psp</em>, <em>inf</em>);
</p>
</li>
<li>
<p>
The possible complements.
</p>
</li>
</ul>
<p>For the latter, there is a large variety of possibilities. These are the basic ones:</p>
<div class="tableblock">
<table rules="all"
frame="hsides"
cellspacing="0" cellpadding="4">
<caption class="title">Table: Verb's fourth argument, single forms</caption>
<col width="548" />
<col width="502" />
<thead>
<tr>
<th align="left">
Tag
</th>
<th align="left">
Example
</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">
intransitive
</td>
<td align="left">
Ik <em>schrijf</em>
</td>
</tr>
<tr>
<td align="left">
transitive
</td>
<td align="left">
Ik <em>schrijf</em> een brief
</td>
</tr>
<tr>
<td align="left">
np_np
</td>
<td align="left">
Ik <em>schrijf</em> mijn moeder een brief
</td>
</tr>
<tr>
<td align="left">
so_pp_np
</td>
<td align="left">
Ik <em>schrijf</em> een brief aan mijn moeder
</td>
</tr>
<tr>
<td align="left">
so_np
</td>
<td align="left">
Ik <em>schrijf</em> mijn moeder
</td>
</tr>
<tr>
<td align="left">
refl
</td>
<td align="left">
Ik <em>schaam</em> me
</td>
</tr>
<tr>
<td align="left">
copula
</td>
<td align="left">
Ik <em>ben</em> een echte fietser
</td>
</tr>
<tr>
<td align="left">
pred_np
</td>
<td align="left">
Ik <em>vind</em> dat leuk
</td>
</tr>
<tr>
<td align="left">
pc_pp(over)
</td>
<td align="left">
Ik <em>schrijf</em> over de ramp
</td>
</tr>
<tr>
<td align="left">
ld_pp
</td>
<td align="left">
Ik <em>zwaai</em> naar mijn moeder
</td>
</tr>
<tr>
<td align="left">
er_er
</td>
<td align="left">
Er <em>zijn</em> er die voetballen leuk vinden
</td>
</tr>
<tr>
<td align="left">
part_intransitive(mee)
</td>
<td align="left">
Ik <em>schrijf</em> mee
</td>
</tr>
<tr>
<td align="left">
fixed([svp_pp(op,naam),acc],norm_passive)
</td>
<td align="left">
Ik <em>schrijf</em> die overwinning op mijn naam
</td>
</tr>
<tr>
<td align="left">
vp
</td>
<td align="left">
Ik <em>speel</em> om te winnen
</td>
</tr>
<tr>
<td align="left">
sbar
</td>
<td align="left">
Ik <em>schrijf</em> dat ik huil
</td>
</tr>
<tr>
<td align="left">
cleft
</td>
<td align="left">
Het <em>was</em> op Piet dat hij een uur moest wachten
</td>
</tr>
<tr>
<td align="left">
aan_het
</td>
<td align="left">
Ik <em>ben</em> aan het lopen
</td>
</tr>
<tr>
<td align="left">
aci
</td>
<td align="left">
Ik <em>laat</em> hem fietsen
</td>
</tr>
<tr>
<td align="left">
aux_psp_hebben
</td>
<td align="left">
Ik <em>heb</em> gefietst
</td>
</tr>
<tr>
<td align="left">
aux_psp_zijn
</td>
<td align="left">
Ik <em>ben</em> nog een uurtje gebleven
</td>
</tr>
<tr>
<td align="left">
aux(inf)
</td>
<td align="left">
Ik <em>zal</em> fietsen
</td>
</tr>
<tr>
<td align="left">
aux(te)
</td>
<td align="left">
Ik <em>blijk</em> te blozen
</td>
</tr>
<tr>
<td align="left">
passive
</td>
<td align="left">
Ik <em>word/ben</em> door mijn moeder uitgezwaaid
</td>
</tr>
<tr>
<td align="left">
te_passive
</td>
<td align="left">
Ik <em>ben</em> te vinden in de kelder
</td>
</tr>
<tr>
<td align="left">
dip_sbar_subj
</td>
<td align="left">
Ik <em>denk</em> , zei Piet , dat hij komt
</td>
</tr>
</tbody>
</table>
</div>
<p>With a bit of creativity one can easily see the meaning of related
POS-tags. A few examples are:</p>
<div class="tableblock">
<table rules="all"
frame="hsides"
cellspacing="0" cellpadding="4">
<caption class="title">Table: Verb's fourth argument, combined forms</caption>
<col width="548" />
<col width="502" />
<thead>
<tr>
<th align="left">
Tag
</th>
<th align="left">
Example
</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">
ld_adv
</td>
<td align="left">
Ik <em>ben</em> daar
</td>
</tr>
<tr>
<td align="left">