-
Notifications
You must be signed in to change notification settings - Fork 77
/
MANUAL.html
18913 lines (18396 loc) · 502 KB
/
MANUAL.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 HTML 4.0 Transitional//EN">
<html>
<head>
<meta name="generator" content="http://txt2tags.org">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>UDPipe 1</title>
</head>
<body>
<div class="header" id="header">
<h1>UDPipe 1</h1>
<h2>Version 1.3.2-dev</h2>
</div>
<div class="toc">
<ol>
<li><a href="#introduction">Introduction</a>
</li>
<li><a href="#online">Online Web Application and Web Service</a>
</li>
<li><a href="#release">Release</a>
<ul>
<li><a href="#download">3.1. Download</a>
<ul>
<li><a href="#available_models">3.1.1. Available Models</a>
</li>
</ul>
</li>
<li><a href="#license">3.2. License</a>
</li>
</ul>
</li>
<li><a href="#installation">UDPipe Installation</a>
<ul>
<li><a href="#requirements">4.1. Requirements</a>
</li>
<li><a href="#compilation">4.2. Compilation</a>
<ul>
<li><a href="#compilation_platforms">4.2.1. Platforms</a>
</li>
<li><a href="#compilation_further_details">4.2.2. Further Details</a>
</li>
</ul>
</li>
<li><a href="#other_language_bindings">4.3. Other language bindings</a>
<ul>
<li><a href="#csharp_installation">4.3.1. C#</a>
</li>
<li><a href="#java_installation">4.3.2. Java</a>
</li>
<li><a href="#perl_installation">4.3.3. Perl</a>
</li>
<li><a href="#python_installation">4.3.4. Python</a>
</li>
</ul>
</li>
</ul>
</li>
<li><a href="#models">UDPipe Models</a>
<ul>
<li><a href="#universal_dependencies_25_models">5.1. Universal Dependencies 2.5 Models</a>
<ul>
<li><a href="#universal_dependencies_25_models_download">5.1.1. Download</a>
</li>
<li><a href="#universal_dependencies_25_models_acknowledgements">5.1.2. Acknowledgements</a>
</li>
<li><a href="#universal_dependencies_25_models_description">5.1.3. Model Description</a>
</li>
<li><a href="#universal_dependencies_25_models_performance">5.1.4. Model Performance</a>
</li>
</ul>
</li>
<li><a href="#universal_dependencies_24_models">5.2. Universal Dependencies 2.4 Models</a>
<ul>
<li><a href="#universal_dependencies_24_models_download">5.2.1. Download</a>
</li>
<li><a href="#universal_dependencies_24_models_acknowledgements">5.2.2. Acknowledgements</a>
</li>
<li><a href="#universal_dependencies_24_models_description">5.2.3. Model Description</a>
</li>
<li><a href="#universal_dependencies_24_models_performance">5.2.4. Model Performance</a>
</li>
</ul>
</li>
<li><a href="#universal_dependencies_23_models">5.3. Universal Dependencies 2.3 Models</a>
<ul>
<li><a href="#universal_dependencies_23_models_download">5.3.1. Download</a>
</li>
<li><a href="#universal_dependencies_23_models_acknowledgements">5.3.2. Acknowledgements</a>
</li>
<li><a href="#universal_dependencies_23_models_description">5.3.3. Model Description</a>
</li>
<li><a href="#universal_dependencies_23_models_performance">5.3.4. Model Performance</a>
</li>
</ul>
</li>
<li><a href="#conll18_shared_task_baseline_ud_22_models">5.4. CoNLL18 Shared Task Baseline UD 2.2 Models</a>
<ul>
<li><a href="#conll18_shared_task_baseline_ud_22_models_download">5.4.1. Download</a>
</li>
<li><a href="#conll18_shared_task_baseline_ud_22_models_ackowledgements">5.4.2. Acknowledgements</a>
</li>
</ul>
</li>
<li><a href="#universal_dependencies_20_models">5.5. Universal Dependencies 2.0 Models</a>
<ul>
<li><a href="#universal_dependencies_20_models_download">5.5.1. Download</a>
</li>
<li><a href="#universal_dependencies_20_models_acknowledgements">5.5.2. Acknowledgements</a>
</li>
<li><a href="#universal_dependencies_20_models_description">5.5.3. Model Description</a>
</li>
<li><a href="#universal_dependencies_20_models_performance">5.5.4. Model Performance</a>
</li>
</ul>
</li>
<li><a href="#conll17_shared_task_baseline_ud_20_models">5.6. CoNLL17 Shared Task Baseline UD 2.0 Models</a>
<ul>
<li><a href="#conll17_shared_task_baseline_ud_20_models_download">5.6.1. Download</a>
</li>
<li><a href="#conll17_shared_task_baseline_ud_20_models_ackowledgements">5.6.2. Acknowledgements</a>
</li>
</ul>
</li>
<li><a href="#universal_dependencies_12_models">5.7. Universal Dependencies 1.2 Models</a>
<ul>
<li><a href="#universal_dependencies_12_models_download">5.7.1. Download</a>
</li>
<li><a href="#universal_dependencies_12_models_acknowledgements">5.7.2. Acknowledgements</a>
</li>
<li><a href="#universal_dependencies_12_models_description">5.7.3. Model Description</a>
</li>
<li><a href="#universal_dependencies_12_models_performance">5.7.4. Model Performance</a>
</li>
</ul>
</li>
</ul>
</li>
<li><a href="#users_manual">UDPipe User's Manual</a>
<ul>
<li><a href="#run_udpipe">6.1. Running UDPipe</a>
<ul>
<li><a href="#run_udpipe_immediate">6.1.1. Immediate Mode</a>
</li>
<li><a href="#run_udpipe_model_on_demand">6.1.2. Loading Model On Demand</a>
</li>
<li><a href="#run_udpipe_tokenizer">6.1.3. Tokenizer</a>
</li>
<li><a href="#run_udpipe_input">6.1.4. Input Formats</a>
</li>
<li><a href="#run_udpipe_tagger">6.1.5. Tagger</a>
</li>
<li><a href="#run_udpipe_parser">6.1.6. Dependency Parsing</a>
</li>
<li><a href="#run_udpipe_output">6.1.7. Output Formats</a>
</li>
</ul>
</li>
<li><a href="#udpipe_server">6.2. Running the UDPipe REST Server</a>
</li>
<li><a href="#model_training">6.3. Training UDPipe Models</a>
<ul>
<li><a href="#model_training_reusing_components">6.3.1. Reusing Components from Existing Models</a>
</li>
<li><a href="#model_training_random_search">6.3.2. Random Hyperparameter Search</a>
</li>
<li><a href="#model_training_tokenizer">6.3.3. Tokenizer</a>
</li>
<li><a href="#model_training_tagger">6.3.4. Tagger</a>
</li>
<li><a href="#model_training_parser">6.3.5. Parser</a>
</li>
<li><a href="#udpipe_accuracy">6.3.6. Measuring Model Accuracy</a>
</li>
</ul>
</li>
</ul>
</li>
<li><a href="#api_reference">UDPipe API Reference</a>
<ul>
<li><a href="#versioning">7.1. UDPipe Versioning</a>
</li>
<li><a href="#string_piece">7.2. Struct string_piece</a>
</li>
<li><a href="#token">7.3. Class token</a>
<ul>
<li><a href="#token_get_space_after">7.3.1. token::get_space_after()</a>
</li>
<li><a href="#token_set_space_after">7.3.2. token::set_space_after()</a>
</li>
<li><a href="#token_get_spaces_before">7.3.3. token::get_spaces_before()</a>
</li>
<li><a href="#token_set_spaces_before">7.3.4. token::set_spaces_before()</a>
</li>
<li><a href="#token_get_spaces_after">7.3.5. token::get_spaces_after()</a>
</li>
<li><a href="#token_set_spaces_after">7.3.6. token::set_spaces_after()</a>
</li>
<li><a href="#token_get_spaces_in_token">7.3.7. token::get_spaces_in_token()</a>
</li>
<li><a href="#token_set_spaces_in_token">7.3.8. token::set_spaces_in_token()</a>
</li>
<li><a href="#token_get_token_range">7.3.9. token::get_token_range()</a>
</li>
<li><a href="#token_set_token_range">7.3.10. token::set_token_range()</a>
</li>
</ul>
</li>
<li><a href="#word">7.4. Class word</a>
</li>
<li><a href="#multiword_token">7.5. Class multiword_token</a>
</li>
<li><a href="#empty_node">7.6. Class empty_node</a>
</li>
<li><a href="#sentence">7.7. Class sentence</a>
<ul>
<li><a href="#sentence_empty">7.7.1. sentence::empty()</a>
</li>
<li><a href="#sentence_clear">7.7.2. sentence::clear()</a>
</li>
<li><a href="#sentence_add_word">7.7.3. sentence::add_word()</a>
</li>
<li><a href="#sentence_set_head">7.7.4. sentence:set_head()</a>
</li>
<li><a href="#sentence_unlink_all_words">7.7.5. sentence::unlink_all_words()</a>
</li>
<li><a href="#sentence_get_new_doc">7.7.6. sentence::get_new_doc()</a>
</li>
<li><a href="#sentence_set_new_doc">7.7.7. sentence::set_new_doc()</a>
</li>
<li><a href="#sentence_get_new_par">7.7.8. sentence::get_new_par()</a>
</li>
<li><a href="#sentence_set_new_par">7.7.9. sentence::set_new_par()</a>
</li>
<li><a href="#sentence_get_sent_id">7.7.10. sentence::get_sent_id()</a>
</li>
<li><a href="#sentence_set_sent_id">7.7.11. sentence::set_sent_id()</a>
</li>
<li><a href="#sentence_get_text">7.7.12. sentence::get_text()</a>
</li>
<li><a href="#sentence_set_text">7.7.13. sentence::set_text()</a>
</li>
</ul>
</li>
<li><a href="#input_format">7.8. Class input_format</a>
<ul>
<li><a href="#input_format_read_block">7.8.1. input_format::read_block()</a>
</li>
<li><a href="#input_format_reset_document">7.8.2. input_format::reset_document()</a>
</li>
<li><a href="#input_format_set_text">7.8.3. input_format::set_text()</a>
</li>
<li><a href="#input_format_next_sentence">7.8.4. input_format::next_sentence()</a>
</li>
<li><a href="#input_format_new_input_format">7.8.5. input_format::new_input_format()</a>
</li>
<li><a href="#input_format_new_conllu_input_format">7.8.6. input_format::new_conllu_input_format()</a>
</li>
<li><a href="#input_format_new_generic_tokenizer_input_format">7.8.7. input_format::new_generic_tokenizer_input_format()</a>
</li>
<li><a href="#input_format_new_horizontal_input_format">7.8.8. input_format::new_horizontal_input_format()</a>
</li>
<li><a href="#input_format_new_vertical_input_format">7.8.9. input_format::new_vertical_input_format()</a>
</li>
<li><a href="#input_format_new_presegmented_tokenizer">7.8.10. input_format::new_presegmented_tokenizer()</a>
</li>
</ul>
</li>
<li><a href="#output_format">7.9. Class output_format</a>
<ul>
<li><a href="#output_format_write_sentence">7.9.1. output_format::write_sentence()</a>
</li>
<li><a href="#output_format_finish_document">7.9.2. output_format::finish_document()</a>
</li>
<li><a href="#output_format_new_output_format">7.9.3. output_format::new_output_format()</a>
</li>
<li><a href="#output_format_new_conllu_output_format">7.9.4. output_format::new_conllu_output_format()</a>
</li>
<li><a href="#output_format_new_epe_output_format">7.9.5. output_format::new_epe_output_format()</a>
</li>
<li><a href="#output_format_new_matxin_output_format">7.9.6. output_format::new_matxin_output_format()</a>
</li>
<li><a href="#output_format_new_plaintext_output_format">7.9.7. output_format::new_plaintext_output_format()</a>
</li>
<li><a href="#output_format_new_horizontal_output_format">7.9.8. output_format::new_horizontal_output_format()</a>
</li>
<li><a href="#output_format_new_vertical_output_format">7.9.9. output_format::new_vertical_output_format()</a>
</li>
</ul>
</li>
<li><a href="#model">7.10. Class model</a>
<ul>
<li><a href="#model_load_cstring">7.10.1. model::load(const char*)</a>
</li>
<li><a href="#model_load_istream">7.10.2. model::load(istream&)</a>
</li>
<li><a href="#model_new_tokenizer">7.10.3. model::new_tokenizer()</a>
</li>
<li><a href="#model_tag">7.10.4. model::tag()</a>
</li>
<li><a href="#model_parse">7.10.5. model::parse()</a>
</li>
</ul>
</li>
<li><a href="#pipeline">7.11. Class pipeline</a>
<ul>
<li><a href="#pipeline_set_model">7.11.1. pipeline::set_model()</a>
</li>
<li><a href="#pipeline_set_input">7.11.2. pipeline::set_input()</a>
</li>
<li><a href="#pipeline_set_tagger">7.11.3. pipeline::set_tagger()</a>
</li>
<li><a href="#pipeline_set_parser">7.11.4. pipeline::set_parser()</a>
</li>
<li><a href="#pipeline_set_output">7.11.5. pipeline::set_output()</a>
</li>
<li><a href="#pipeline_set_immediate">7.11.6. pipeline::set_immediate()</a>
</li>
<li><a href="#pipeline_set_document_id">7.11.7. pipeline::set_document_id()</a>
</li>
<li><a href="#pipeline_process">7.11.8. pipeline::process()</a>
</li>
</ul>
</li>
<li><a href="#trainer">7.12. Class trainer</a>
<ul>
<li><a href="#trainer_train">7.12.1. trainer::train()</a>
</li>
</ul>
</li>
<li><a href="#evaluator">7.13. Class evaluator</a>
<ul>
<li><a href="#evaluator_set_model">7.13.1. evaluator::set_model()</a>
</li>
<li><a href="#evaluator_set_tokenizer">7.13.2. evaluator::set_tokenizer()</a>
</li>
<li><a href="#evaluator_set_tagger">7.13.3. evaluator::set_tagger()</a>
</li>
<li><a href="#evaluator_set_parser">7.13.4. evaluator::set_parser()</a>
</li>
<li><a href="#evaluator_evaluate">7.13.5. evaluator::evaluate()</a>
</li>
</ul>
</li>
<li><a href="#version">7.14. Class version</a>
<ul>
<li><a href="#version_current">7.14.1. version::current</a>
</li>
</ul>
</li>
<li><a href="#cpp_bindings_api">7.15. C++ Bindings API</a>
<ul>
<li><a href="#bindings_helper_structures">7.15.1. Helper Structures</a>
</li>
<li><a href="#bindings_main_classes">7.15.2. Main Classes</a>
</li>
</ul>
</li>
<li><a href="#csharp_bindings">7.16. C# Bindings</a>
</li>
<li><a href="#java_bindings">7.17. Java Bindings</a>
</li>
<li><a href="#perl_bindings">7.18. Perl Bindings</a>
</li>
<li><a href="#python_bindings">7.19. Python Bindings</a>
</li>
</ul>
</li>
<li><a href="#contact">Contact</a>
</li>
<li><a href="#udpipe_acknowledgements">Acknowledgements</a>
<ul>
<li><a href="#publications">9.1. Publications</a>
</li>
<li><a href="#bibtex_for_referencing">9.2. Bibtex for Referencing</a>
</li>
<li><a href="#persistent_identifier">9.3. Persistent Identifier</a>
</li>
</ul>
</li>
</ol>
</div>
<div class="body" ID="body">
<a id="introduction" name="introduction"></a>
<h1>1. Introduction</h1>
<p>
UDPipe is a trainable pipeline for tokenization, tagging, lemmatization and
dependency parsing of CoNLL-U files. UDPipe is language-agnostic and can be trained given
annotated data in <a href="http://universaldependencies.org/format.html">CoNLL-U format</a>. Trained models are provided for
nearly all <a href="http://universaldependencies.org">UD treebanks</a>. UDPipe is available as a binary for Linux/Windows/OS X, as a library for
C++, Python, Perl, Java, C#, and as a web service.
<a href="https://CRAN.R-project.org/package=udpipe">Third-party R CRAN package</a> also exists.
</p>
<p>
UDPipe is a free software distributed under the
<a href="http://www.mozilla.org/MPL/2.0/">Mozilla Public License 2.0</a> and the linguistic models
are free for non-commercial use and distributed under the
<a href="http://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA</a> license, although for some
models the original data used to create the model may impose additional
licensing conditions. UDPipe is versioned using <a href="http://semver.org/">Semantic Versioning</a>.
</p>
<p>
Copyright 2017 by Institute of Formal and Applied Linguistics, Faculty of
Mathematics and Physics, Charles University, Czech Republic.
</p>
<a id="online" name="online"></a>
<h1>2. Online Web Application and Web Service</h1>
<p>
UDPipe Web Application is available at <a href="http://lindat.mff.cuni.cz/services/udpipe/">http://lindat.mff.cuni.cz/services/udpipe/</a>
using <a href="http://lindat.cz">LINDAT/CLARIN infrastructure</a>.
</p>
<p>
UDPipe REST Web Service is also available, with the API documentation available at
<a href="http://lindat.mff.cuni.cz/services/udpipe/api-reference.php">http://lindat.mff.cuni.cz/services/udpipe/api-reference.php</a>.
</p>
<a id="release" name="release"></a>
<h1>3. Release</h1>
<a id="download" name="download"></a>
<h2>3.1. Download</h2>
<p>
UDPipe releases are available on <a href="http://github.com/ufal/udpipe">GitHub</a>, both as
source code and as a pre-compiled binary package. The binary package contains Linux,
Windows and OS X binaries, Java bindings binary, C# bindings binary, and source
code of UDPipe and all language bindings). While the binary
packages do not contain compiled Python or Perl bindings, packages for those
languages are available in standard package repositories,
i.e. on <a href="https://pypi.python.org/pypi/ufal.udpipe/">PyPI</a>
and <a href="https://metacpan.org/pod/Ufal::UDPipe">CPAN</a>.
</p>
<ul>
<li><a href="http://github.com/ufal/udpipe/releases/latest">Latest release</a>
</li>
<li><a href="http://github.com/ufal/udpipe/releases">All releases</a>, <a href="https://github.com/ufal/udpipe/blob/master/CHANGES">Changelog</a>
</li>
</ul>
<p>
You might also be interested in a contributed package
<a href="https://github.com/TakeLab/spacy-udpipe">spacy-udpipe</a> which wraps UDPipe
with spaCy API.
</p>
<a id="available_models" name="available_models"></a>
<h3>3.1.1. Available Models</h3>
<p>
To use UDPipe, a model is needed. The models are available
from <a href="http://www.lindat.cz">LINDAT/CLARIN</a> infrastructure and described further
in the
<a href="#models">UDPipe Models</a>.
Currently, the following models are available:
</p>
<ul>
<li>Universal Dependencies 2.5 Models: <a href="http://hdl.handle.net/11234/1-3131">udpipe-ud2.5-191206</a> (<a href="http://ufal.mff.cuni.cz/udpipe/1/models#universal_dependencies_25_models">documentation</a>)
</li>
<li>Universal Dependencies 2.4 Models: <a href="http://hdl.handle.net/11234/1-2998">udpipe-ud2.4-190531</a> (<a href="http://ufal.mff.cuni.cz/udpipe/1/models#universal_dependencies_24_models">documentation</a>)
</li>
<li>Universal Dependencies 2.3 Models: <a href="http://hdl.handle.net/11234/1-2898">udpipe-ud2.3-181115</a> (<a href="http://ufal.mff.cuni.cz/udpipe/1/models#universal_dependencies_23_models">documentation</a>)
</li>
<li>CoNLL18 Shared Task Baseline UD 2.2 Models: <a href="http://hdl.handle.net/11234/1-2859">udpipe-ud2.2-conll18-180430</a> (<a href="http://ufal.mff.cuni.cz/udpipe/1/models#conll18_shared_task_baseline_ud_22_models">documentation</a>)
</li>
<li>Universal Dependencies 2.0 Models: <a href="http://hdl.handle.net/11234/1-2364">udpipe-ud2.0-170801</a> (<a href="http://ufal.mff.cuni.cz/udpipe/1/models#universal_dependencies_20_models">documentation</a>)
</li>
<li>CoNLL17 Shared Task Baseline UD 2.0 Models: <a href="http://hdl.handle.net/11234/1-1990">udpipe-ud2.0-conll17-170315</a> (<a href="http://ufal.mff.cuni.cz/udpipe/1/models#conll17_shared_task_baseline_ud_20_models">documentation</a>)
</li>
<li>Universal Dependencies 1.2 Models: <a href="http://hdl.handle.net/11234/1-1659">udpipe-ud1.2-160523</a> (<a href="http://ufal.mff.cuni.cz/udpipe/1/models#universal_dependencies_12_models">documentation</a>)
</li>
</ul>
<a id="license" name="license"></a>
<h2>3.2. License</h2>
<p>
UDPipe is an open-source project and is freely available for non-commercial
purposes. The library is distributed under
<a href="http://www.mozilla.org/MPL/2.0/">Mozilla Public License 2.0</a> and the associated models and data
under <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA</a>, although
for some models the original data used to create the model may impose
additional licensing conditions.
</p>
<p>
If you use this tool for scientific work, please give credit to us by
referencing <a href="#bibtex_for_referencing">Straka et al. 2016</a> and the
<a href="http://ufal.mff.cuni.cz/udpipe">UDPipe website</a>.
</p>
<a id="installation" name="installation"></a>
<h1>4. UDPipe Installation</h1>
<p>
UDPipe releases are available on <a href="http://github.com/ufal/udpipe">GitHub</a>, either as
a pre-compiled binary package, or source code only. The binary package contains Linux,
Windows and OS X binaries, Java bindings binary, C# bindings binary, and source
code of UDPipe and all language bindings. While the binary
packages do not contain compiled Python or Perl bindings, packages for those
languages are available in standard package repositories, i.e. on PyPI and CPAN.
</p>
<p>
To use UDPipe, a model is needed.
<a href="http://ufal.mff.cuni.cz/udpipe/1#available_models">Here is a list of available models</a>.
</p>
<p>
If you want to compile UDPipe manually, sources are available on on
<a href="http://github.com/ufal/udpipe">GitHub</a>, both in the
<a href="http://github.com/ufal/udpipe/releases">pre-compiled binary package releases</a>
and in the repository itself.
</p>
<a id="requirements" name="requirements"></a>
<h2>4.1. Requirements</h2>
<ul>
<li><code>g++ 4.7</code> or newer, <code>clang 3.2</code> or newer, Visual C++ 2015 or newer
</li>
<li><code>make</code>
</li>
<li><code>SWIG 3.0.8</code> or newer for language bindings other than <code>C++</code>
</li>
</ul>
<a id="compilation" name="compilation"></a>
<h2>4.2. Compilation</h2>
<p>
To compile UDPipe, run <code>make</code> in the <code>src</code> directory.
</p>
<p style="margin-bottom:0">
Make targets and options:
</p>
<ul style="margin-top:0">
<li><code>exe</code>: compile the binaries (default)
</li>
<li><code>server</code>: compile the REST server
</li>
<li><code>lib</code>: compile the static library
</li>
<li><code>BITS=32</code> or <code>BITS=64</code>: compile for specified 32-bit or 64-bit architecture instead of the default one
</li>
<li><code>MODE=release</code>: create release build which statically links the C++ runtime and uses LTO
</li>
<li><code>MODE=debug</code>: create debug build
</li>
<li><code>MODE=profile</code>: create profile build
</li>
</ul>
<a id="compilation_platforms" name="compilation_platforms"></a>
<h3>4.2.1. Platforms</h3>
<p style="margin-bottom:0">
Platform can be selected using one of the following options:
</p>
<ul style="margin-top:0">
<li><code>PLATFORM=linux</code>, <code>PLATFORM=linux-gcc</code>: gcc compiler on Linux operating system, default on Linux
</li>
<li><code>PLATFORM=linux-clang</code>: clang compiler on Linux, must be selected manually
</li>
<li><code>PLATFORM=macos</code>, <code>PLATFORM=macos-clang</code>: clang compiler on OS X, default on OS X; <code>BITS=32+64</code> enables multiarch build
</li>
<li><code>PLATFORM=win</code>, <code>PLATFORM=win-gcc</code>: gcc compiler on Windows (TDM-GCC is well tested), default on Windows
</li>
<li><code>PLATFORM=win-vs</code>: Visual C++ 2015 compiler on Windows, must be selected manually; note that the
<code>cl.exe</code> compiler must be already present in <code>PATH</code> and corresponding <code>BITS=32</code> or <code>BITS=64</code>
must be specified
</li>
</ul>
<p>
Either POSIX shell or Windows CMD can be used as shell, it is detected automatically.
</p>
<a id="compilation_further_details" name="compilation_further_details"></a>
<h3>4.2.2. Further Details</h3>
<p>
UDPipe uses <a href="http://github.com/ufal/cpp_builtem">C++ BuilTem system</a>,
please refer to its manual if interested in all supported options.
</p>
<a id="other_language_bindings" name="other_language_bindings"></a>
<h2>4.3. Other language bindings</h2>
<a id="csharp_installation" name="csharp_installation"></a>
<h3>4.3.1. C#</h3>
<p>
Binary C# bindings are available in UDPipe binary packages.
</p>
<p>
To compile C# bindings manually, run <code>make</code> in the <code>bindings/csharp</code>
directory, optionally with the options described in UDPipe Installation.
</p>
<a id="java_installation" name="java_installation"></a>
<h3>4.3.2. Java</h3>
<p>
Binary Java bindings are available in UDPipe binary packages.
</p>
<p>
To compile Java bindings manually, run <code>make</code> in the <code>bindings/java</code>
directory, optionally with the options described in UDPipe Installation.
Java 6 and newer is supported.
</p>
<p style="margin-bottom:0">
The Java installation specified in the environment variable <code>JAVA_HOME</code> is
used. If the environment variable does not exist, the <code>JAVA_HOME</code> can be
specified using
</p>
<pre style="margin-top:0">
make JAVA_HOME=path_to_Java_installation
</pre>
<a id="perl_installation" name="perl_installation"></a>
<h3>4.3.3. Perl</h3>
<p>
The Perl bindings are available as <code>Ufal-UDPipe</code> package on CPAN.
</p>
<p>
To compile Perl bindings manually, run <code>make</code> in the <code>bindings/perl</code>
directory, optionally with the options described in UDPipe Installation.
Perl 5.10 and later is supported.
</p>
<p style="margin-bottom:0">
Path to the include headers of the required Perl version must be specified
in the <code>PERL_INCLUDE</code> variable using
</p>
<pre style="margin-top:0">
make PERL_INCLUDE=path_to_Perl_includes
</pre>
<a id="python_installation" name="python_installation"></a>
<h3>4.3.4. Python</h3>
<p>
The Python bindings are available as <code>ufal.udpipe</code> package on PyPI.
</p>
<p>
To compile Python bindings manually, run <code>make</code> in the <code>bindings/python</code>
directory, optionally with options described in UDPipe Installation. Both
Python 2.6+ and Python 3+ are supported.
</p>
<p style="margin-bottom:0">
Path to the include headers of the required Python version must be specified
in the <code>PYTHON_INCLUDE</code> variable using
</p>
<pre style="margin-top:0">
make PYTHON_INCLUDE=path_to_Python_includes
</pre>
<p>
You might also be interested in a contributed package
<a href="https://github.com/TakeLab/spacy-udpipe">spacy-udpipe</a> which wraps UDPipe
with spaCy API.
</p>
<a id="models" name="models"></a>
<h1>5. UDPipe Models</h1>
<p>
Like any supervised machine-learning tool, UDPipe needs a trained linguistic model.
This section describes the available models.
</p>
<a id="universal_dependencies_25_models" name="universal_dependencies_25_models"></a>
<h2>5.1. Universal Dependencies 2.5 Models</h2>
<p>
Universal Dependencies 2.5 Models are distributed under the
<a href="http://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA</a> licence.
The models are based solely on
<a href="http://hdl.handle.net/11234/1-3105">Universal Dependencies 2.5</a> treebanks.
The models work in UDPipe version 1.2 and later.
</p>
<p>
Universal Dependencies 2.5 Models are versioned according to the date released
in the format <code>YYMMDD</code>, where <code>YY</code>, <code>MM</code> and <code>DD</code> are two-digit
representation of year, month and day, respectively. The latest version is 191206.
</p>
<a id="universal_dependencies_25_models_download" name="universal_dependencies_25_models_download"></a>
<h3>5.1.1. Download</h3>
<p>
The latest version 190531 of the Universal Dependencies 2.5 models can be downloaded
from <a href="http://hdl.handle.net/11234/1-3131">LINDAT/CLARIN repository</a>.
</p>
<a id="universal_dependencies_25_models_acknowledgements" name="universal_dependencies_25_models_acknowledgements"></a>
<h3>5.1.2. Acknowledgements</h3>
<p>
This work has been partially supported and has been using language resources
and tools developed, stored and distributed by the LINDAT/CLARIN project of the
Ministry of Education, Youth and Sports of the Czech Republic (project <i>LM2015071</i>).
</p>
<p>
The models were trained on <a href="http://hdl.handle.net/11234/1-3105">Universal Dependencies 2.5</a> treebanks.
</p>
<p>
For the UD treebanks which do not contain original plain text version,
raw text is used to train the tokenizer instead. The plain texts
were taken from the <a href="http://hdl.handle.net/11858/00-097C-0000-0022-6133-9">W2C – Web to Corpus</a>.
</p>
<a id="universal_dependencies_25_models_publications" name="universal_dependencies_25_models_publications"></a>
<h4>5.1.2.1. Publications</h4>
<ul>
<li>(Straka et al. 2017) Milan Straka and Jana Straková. <i><a href="http://ufal.mff.cuni.cz/~straka/papers/2017-conll_udpipe.pdf">Tokenizing, POS Tagging, Lemmatizing and Parsing UD 2.0 with UDPipe</a></i>. In Proceedings of the CoNLL 2017 Shared Task: Multilingual Parsing from Raw Text to Universal Dependencies, Vancouver, Canada, August 2017.
</li>
<li>(Straka et al. 2016) Straka Milan, Hajič Jan, Straková Jana. <i><a href="http://ufal.mff.cuni.cz/~straka/papers/2016-lrec_udpipe.pdf">UDPipe: Trainable Pipeline for Processing CoNLL-U Files Performing Tokenization, Morphological Analysis, POS Tagging and Parsing</a></i>. In Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC 2016), Portorož, Slovenia, May 2016.
</li>
</ul>
<a id="universal_dependencies_25_models_description" name="universal_dependencies_25_models_description"></a>
<h3>5.1.3. Model Description</h3>
<p>
The Universal Dependencies 2.5 models contain 94 models of 61 languages, each consisting of
a tokenizer, tagger, lemmatizer and dependency parser, all trained using
the UD data. We used the original train-dev-test split, but for treebanks with
only train and no dev data we used last 10% of the train data as dev data.
We produce models only for treebanks with at least 1000 training words.
</p>
<p>
The tokenizer is trained using the <code>SpaceAfter=No</code> features. If the features
are not present in the data, they can be filled in using raw text in the
language in question.
</p>
<p>
The tagger, lemmatizer and parser are trained using gold UD data.
</p>
<p>
Details about model architecture and training process can be found in the
(Straka et al. 2017) paper.
</p>
<a id="universal_dependencies_25_reprodusible_training" name="universal_dependencies_25_reprodusible_training"></a>
<h4>5.1.3.1. Reproducible Training</h4>
<p>
In case you want to train the same models, scripts for downloading and
resplitting UD 2.5 data, precomputed word embedding, raw texts for tokenizers,
all hyperparameter values and training scripts are available in the
second archive on the <a href="http://hdl.handle.net/11234/1-3131">model download page</a>.
</p>
<a id="universal_dependencies_25_models_performance" name="universal_dependencies_25_models_performance"></a>
<h3>5.1.4. Model Performance</h3>
<p>
We present the tagger, lemmatizer and parser performance, measured
on the testing portion of the data, evaluated in three different settings:
using raw text only, using gold tokenization only, and using gold tokenization
plus gold morphology (UPOS, XPOS, FEATS and Lemma).
</p>
<table border="1">
<tr>
<th>Treebank</th>
<th>Mode</th>
<th>Words</th>
<th>Sents</th>
<th>UPOS</th>
<th>XPOS</th>
<th>UFeats</th>
<th>AllTags</th>
<th>Lemma</th>
<th>UAS</th>
<th>LAS</th>
<th>MLAS</th>
<th>BLEX</th>
</tr>
<tr>
<td>Afrikaans-AfriBooms</td>
<td>Raw text</td>
<td align="right">99.6%</td>
<td align="right">98.2%</td>
<td align="right">95.0%</td>
<td align="right">90.6%</td>
<td align="center">94.6%</td>
<td align="center">90.6%</td>
<td align="right">96.5%</td>
<td align="right">81.6%</td>
<td align="right">77.6%</td>
<td align="right">64.4%</td>
<td align="right">66.5%</td>
</tr>
<tr>
<td>Afrikaans-AfriBooms</td>
<td>Gold tok</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="right">95.3%</td>
<td align="right">90.8%</td>
<td align="center">94.9%</td>
<td align="center">90.8%</td>
<td align="right">96.7%</td>
<td align="right">82.5%</td>
<td align="right">78.4%</td>
<td align="right">65.1%</td>
<td align="right">67.2%</td>
</tr>
<tr>
<td>Afrikaans-AfriBooms</td>
<td>Gold tok+mor</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="right">87.6%</td>
<td align="right">85.0%</td>
<td align="right">77.0%</td>
<td align="right">79.6%</td>
</tr>
<tr>
<td>Ancient Greek-Perseus</td>
<td>Raw text</td>
<td align="right">100.0%</td>
<td align="right">98.8%</td>
<td align="right">82.2%</td>
<td align="right">72.2%</td>
<td align="center">85.7%</td>
<td align="center">72.2%</td>
<td align="right">82.7%</td>
<td align="right">64.0%</td>
<td align="right">57.0%</td>
<td align="right">30.2%</td>
<td align="right">38.2%</td>
</tr>
<tr>
<td>Ancient Greek-Perseus</td>
<td>Gold tok</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="right">82.2%</td>
<td align="right">72.2%</td>
<td align="center">85.7%</td>
<td align="center">72.2%</td>
<td align="right">82.7%</td>
<td align="right">64.1%</td>
<td align="right">57.2%</td>
<td align="right">30.3%</td>
<td align="right">38.4%</td>
</tr>
<tr>
<td>Ancient Greek-Perseus</td>
<td>Gold tok+mor</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="right">68.7%</td>
<td align="right">63.9%</td>
<td align="right">53.1%</td>
<td align="right">57.2%</td>
</tr>
<tr>
<td>Ancient Greek-PROIEL</td>
<td>Raw text</td>
<td align="right">100.0%</td>
<td align="right">48.0%</td>
<td align="right">96.0%</td>
<td align="right">96.2%</td>
<td align="center">88.6%</td>
<td align="center">87.2%</td>
<td align="right">93.2%</td>
<td align="right">72.2%</td>
<td align="right">67.6%</td>
<td align="right">49.9%</td>
<td align="right">56.0%</td>
</tr>
<tr>
<td>Ancient Greek-PROIEL</td>
<td>Gold tok</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="right">96.1%</td>
<td align="right">96.3%</td>
<td align="center">88.7%</td>
<td align="center">87.4%</td>
<td align="right">93.2%</td>
<td align="right">77.0%</td>
<td align="right">72.1%</td>
<td align="right">54.4%</td>
<td align="right">60.3%</td>
</tr>
<tr>
<td>Ancient Greek-PROIEL</td>
<td>Gold tok+mor</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="right">80.2%</td>
<td align="right">76.4%</td>
<td align="right">66.7%</td>
<td align="right">70.3%</td>
</tr>
<tr>
<td>Arabic-PADT</td>
<td>Raw text</td>
<td align="right">94.6%</td>
<td align="right">82.1%</td>
<td align="right">90.4%</td>
<td align="right">84.0%</td>
<td align="center">84.2%</td>
<td align="center">83.8%</td>
<td align="right">88.5%</td>
<td align="right">72.7%</td>
<td align="right">68.1%</td>
<td align="right">56.2%</td>
<td align="right">59.2%</td>
</tr>
<tr>
<td>Arabic-PADT</td>
<td>Gold tok</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="right">95.6%</td>
<td align="right">89.0%</td>
<td align="center">89.2%</td>
<td align="center">88.8%</td>
<td align="right">92.9%</td>
<td align="right">82.0%</td>
<td align="right">76.8%</td>
<td align="right">63.6%</td>
<td align="right">66.3%</td>
</tr>
<tr>
<td>Arabic-PADT</td>
<td>Gold tok+mor</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="right">83.9%</td>
<td align="right">80.7%</td>
<td align="right">75.7%</td>
<td align="right">76.8%</td>
</tr>
<tr>
<td>Armenian-ArmTDP</td>
<td>Raw text</td>
<td align="right">99.3%</td>
<td align="right">97.8%</td>
<td align="right">92.0%</td>
<td align="center">-</td>
<td align="center">84.7%</td>
<td align="center">83.4%</td>
<td align="right">91.8%</td>
<td align="right">75.6%</td>
<td align="right">68.5%</td>
<td align="right">51.2%</td>
<td align="right">57.4%</td>
</tr>
<tr>
<td>Armenian-ArmTDP</td>
<td>Gold tok</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="right">92.5%</td>
<td align="center">-</td>
<td align="center">85.2%</td>
<td align="center">83.8%</td>
<td align="right">92.4%</td>
<td align="right">76.9%</td>
<td align="right">69.7%</td>
<td align="right">51.5%</td>
<td align="right">57.9%</td>
</tr>
<tr>
<td>Armenian-ArmTDP</td>
<td>Gold tok+mor</td>
<td align="center">-</td>