blob: a51371a77d3df24fadeb8b49ad24bc6f695ed2c4 [file] [log] [blame]
Nils Diewald8e323ee2014-04-23 17:28:14 +00001use strict;
2use warnings;
3use utf8;
4use Test::More;
5use Benchmark ':hireswallclock';
6use lib 'lib', '../lib';
7
8use File::Basename 'dirname';
9use File::Spec::Functions 'catdir';
10
11use_ok('KorAP::Document');
12
13# WPD/00001
Akron29fc6b72016-01-28 14:17:15 +010014my $path = catdir(dirname(__FILE__), 'corpus/WPD/00001');
Nils Diewald8e323ee2014-04-23 17:28:14 +000015ok(my $doc = KorAP::Document->new( path => $path . '/' ), 'Load Korap::Document');
Nils Diewald19205712015-06-18 20:06:45 +000016like($doc->path, qr!$path/!, 'Path');
Nils Diewald8e323ee2014-04-23 17:28:14 +000017
18ok($doc = KorAP::Document->new( path => $path ), 'Load Korap::Document');
Nils Diewald19205712015-06-18 20:06:45 +000019like($doc->path, qr!$path/$!, 'Path');
Nils Diewald8e323ee2014-04-23 17:28:14 +000020
21ok($doc->parse, 'Parse document');
22
23# Metdata
Nils Diewald19205712015-06-18 20:06:45 +000024is($doc->text_sigle, 'WPD_AAA.00001', 'ID');
25
Nils Diewald8e323ee2014-04-23 17:28:14 +000026is($doc->title, 'A', 'title');
27ok(!$doc->sub_title, 'subTitle');
Nils Diewald7ec51532014-10-28 19:51:26 +000028is($doc->corpus_sigle, 'WPD', 'corpusID');
Nils Diewald8e323ee2014-04-23 17:28:14 +000029is($doc->pub_date, '20050328', 'pubDate');
30is($doc->pub_place, 'URL:http://de.wikipedia.org', 'pubPlace');
31is($doc->text_class->[0], 'freizeit-unterhaltung', 'TextClass');
32is($doc->text_class->[1], 'reisen', 'TextClass');
33is($doc->text_class->[2], 'wissenschaft', 'TextClass');
34is($doc->text_class->[3], 'populaerwissenschaft', 'TextClass');
35ok(!$doc->text_class->[4], 'TextClass');
Nils Diewald19205712015-06-18 20:06:45 +000036is($doc->author, 'Ruru; Jens.Ol; Aglarech; u.a.', 'author');
37
38#is($doc->author->[0], 'Ruru', 'author');
39#is($doc->author->[1], 'Jens.Ol', 'author');
40#is($doc->author->[2], 'Aglarech', 'author');
41#ok(!$doc->author->[3], 'author');
Nils Diewald8e323ee2014-04-23 17:28:14 +000042
43# Additional information
Nils Diewald19205712015-06-18 20:06:45 +000044ok(!$doc->editor, 'Editor');
Nils Diewald8e323ee2014-04-23 17:28:14 +000045is($doc->publisher, 'Wikipedia', 'Publisher');
46is($doc->creation_date, '20050000', 'Creation date');
Nils Diewald8e323ee2014-04-23 17:28:14 +000047ok(!$doc->text_type, 'No text_type');
Nils Diewald19205712015-06-18 20:06:45 +000048ok(!$doc->text_type_art, 'no text_type art');
49ok(!$doc->text_type_ref, 'no text_type ref');
50ok(!$doc->text_domain, 'no text_domain');
51ok(!$doc->text_column, 'no text_column');
52ok(!$doc->keywords_string, 'no keywords');
53is($doc->text_class_string, 'freizeit-unterhaltung reisen wissenschaft populaerwissenschaft', 'no text classes');
Nils Diewald19205712015-06-18 20:06:45 +000054
55#is($doc->coll_title, 'Wikipedia', 'Collection title');
56#is($doc->coll_sub_title, 'Die freie Enzyklopädie', 'Collection subtitle');
57#is($doc->coll_editor, 'wikipedia.org', 'Collection editor');
58#ok(!$doc->coll_author, 'Collection author');
Nils Diewald8e323ee2014-04-23 17:28:14 +000059
60# BRZ13/00001
Akron29fc6b72016-01-28 14:17:15 +010061$path = catdir(dirname(__FILE__), 'corpus/BRZ13/00001');
Nils Diewald8e323ee2014-04-23 17:28:14 +000062ok($doc = KorAP::Document->new( path => $path . '/' ), 'Load Korap::Document');
63
64ok($doc->parse, 'Parse document');
65is($doc->title, 'Sexueller Missbrauch –„Das schreiende Kind steckt noch tief in mir“', 'title');
66ok(!$doc->sub_title, 'subTitle');
Nils Diewald7ec51532014-10-28 19:51:26 +000067is($doc->text_sigle, 'BRZ13_APR.00001', 'ID');
68is($doc->corpus_sigle, 'BRZ13', 'corpusID');
Nils Diewald19205712015-06-18 20:06:45 +000069
Nils Diewald8e323ee2014-04-23 17:28:14 +000070is($doc->pub_date, '20130402', 'pubDate');
71is($doc->pub_place, 'Braunschweig', 'pubPlace');
Nils Diewald19205712015-06-18 20:06:45 +000072
Nils Diewald8e323ee2014-04-23 17:28:14 +000073is($doc->text_class->[0], 'staat-gesellschaft', 'TextClass');
74is($doc->text_class->[1], 'familie-geschlecht', 'TextClass');
75ok(!$doc->text_class->[2], 'TextClass');
Nils Diewald19205712015-06-18 20:06:45 +000076ok(!$doc->author, 'author');
Nils Diewald8e323ee2014-04-23 17:28:14 +000077
78# Additional information
79ok(!$doc->editor, 'Editor');
80is($doc->publisher, 'Braunschweiger Zeitungsverlag, Druckhaus Albert Limbach GmbH & Co. KG', 'Publisher');
81is($doc->creation_date, '20130402', 'Creation date');
Nils Diewald19205712015-06-18 20:06:45 +000082#is($doc->coll_title, 'Braunschweiger Zeitung', 'Collection title');
83#ok(!$doc->coll_sub_title, 'Collection subtitle');
84#ok(!$doc->coll_editor, 'Collection editor');
85#ok(!$doc->coll_author, 'Collection author');
Nils Diewald8e323ee2014-04-23 17:28:14 +000086is($doc->text_type, 'Zeitung: Tageszeitung', 'text_type');
87ok(!$doc->text_type_art, 'text_type art');
88
89# A01/13047
Akron29fc6b72016-01-28 14:17:15 +010090$path = catdir(dirname(__FILE__), 'corpus/A01/13047');
Nils Diewald8e323ee2014-04-23 17:28:14 +000091ok($doc = KorAP::Document->new( path => $path . '/' ), 'Load Korap::Document');
92
93ok($doc->parse, 'Parse document');
94is($doc->title, 'Fischer und Kolp im Sonnenhügel', 'title');
95ok(!$doc->sub_title, 'subTitle');
Nils Diewald7ec51532014-10-28 19:51:26 +000096is($doc->text_sigle, 'A01_APR.13047', 'ID');
97is($doc->corpus_sigle, 'A01', 'corpusID');
Nils Diewald8e323ee2014-04-23 17:28:14 +000098is($doc->pub_date, '20010402', 'pubDate');
99ok(!$doc->pub_place, 'pubPlace');
100is($doc->text_class->[0], 'freizeit-unterhaltung', 'TextClass');
101is($doc->text_class->[1], 'vereine-veranstaltungen', 'TextClass');
102ok(!$doc->text_class->[2], 'TextClass');
Nils Diewald19205712015-06-18 20:06:45 +0000103ok(!$doc->author, 'author');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000104
105# Additional information
106ok(!$doc->editor, 'Editor');
107ok(!$doc->publisher, 'Publisher');
108is($doc->creation_date, '20010402', 'Creation date');
Nils Diewald19205712015-06-18 20:06:45 +0000109#ok(!$doc->coll_title, 'Collection title');
110#ok(!$doc->coll_sub_title, 'Collection subtitle');
111#ok(!$doc->coll_editor, 'Collection editor');
112#ok(!$doc->coll_author, 'Collection author');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000113ok(!$doc->text_type, 'text_type');
114is($doc->text_type_art, 'Bericht', 'text_type art');
115
Nils Diewald8e323ee2014-04-23 17:28:14 +0000116# ERL/0001
Akron29fc6b72016-01-28 14:17:15 +0100117$path = catdir(dirname(__FILE__), 'corpus/ERL/00001');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000118ok($doc = KorAP::Document->new( path => $path . '/' ), 'Load Korap::Document');
119
120ok($doc->parse, 'Parse document');
Akron29fc6b72016-01-28 14:17:15 +0100121is($doc->title, 'Amtsblatt des Landesbezirks Baden [diverse Erlasse]', 'title'); # Amtsblatt des Landesbezirks Baden [diverse Erlasse]
Akron9d8cbc52016-01-27 21:47:57 +0100122# MK2/ERL.00001
Nils Diewald19205712015-06-18 20:06:45 +0000123
Nils Diewald8e323ee2014-04-23 17:28:14 +0000124ok(!$doc->sub_title, 'subTitle');
Nils Diewald7ec51532014-10-28 19:51:26 +0000125is($doc->text_sigle, 'MK2_ERL.00001', 'ID');
126is($doc->corpus_sigle, 'MK2', 'corpusID');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000127is($doc->pub_date, '00000000', 'pubDate');
128is($doc->pub_place, 'Karlsruhe', 'pubPlace');
129is($doc->text_class->[0], 'politik', 'TextClass');
130is($doc->text_class->[1], 'kommunalpolitik', 'TextClass');
131ok(!$doc->text_class->[2], 'TextClass');
Nils Diewald19205712015-06-18 20:06:45 +0000132ok(!$doc->author, 'author');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000133
134# Additional information
135ok(!$doc->editor, 'Editor');
136is($doc->publisher, 'Badenia Verlag und Druckerei', 'Publisher');
Nils Diewald7ec51532014-10-28 19:51:26 +0000137is($doc->creation_date, '19600000', 'Creation date');
Akron9d8cbc52016-01-27 21:47:57 +0100138
139# !!!
140# diag 'Non-acceptance of creation date ranges may be temporary';
141
142
Nils Diewald19205712015-06-18 20:06:45 +0000143#ok(!$doc->coll_title, 'Collection title');
144#ok(!$doc->coll_sub_title, 'Collection subtitle');
145#ok(!$doc->coll_editor, 'Collection editor');
146#ok(!$doc->coll_author, 'Collection author');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000147is($doc->text_type, 'Erlass', 'text_type');
148ok(!$doc->text_type_art, 'text_type art');
149
Nils Diewald8e323ee2014-04-23 17:28:14 +0000150# A01/02035-substring
Akron29fc6b72016-01-28 14:17:15 +0100151$path = catdir(dirname(__FILE__), 'corpus/A00/02035-substring');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000152ok($doc = KorAP::Document->new( path => $path . '/' ), 'Load Korap::Document');
153
154ok($doc->parse, 'Parse document');
Akron9d8cbc52016-01-27 21:47:57 +0100155is($doc->title, 'St. Galler Tagblatt, 11.01.2000, Ressort: TB-RSP (Abk.)', 'title'); # A00/JAN.02035
Nils Diewald8e323ee2014-04-23 17:28:14 +0000156ok(!$doc->sub_title, 'subTitle');
Nils Diewald7ec51532014-10-28 19:51:26 +0000157is($doc->text_sigle, 'A00_JAN.02035', 'ID');
158is($doc->corpus_sigle, 'A00', 'corpusID');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000159is($doc->pub_date, '20000111', 'pubDate');
160ok(!$doc->pub_place, 'pubPlace');
161is($doc->text_class->[0], 'sport', 'TextClass');
162is($doc->text_class->[1], 'ballsport', 'TextClass');
163ok(!$doc->text_class->[2], 'TextClass');
Nils Diewald19205712015-06-18 20:06:45 +0000164ok(!$doc->author, 'author');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000165
166# Additional information
167ok(!$doc->editor, 'Editor');
168ok(!$doc->publisher, 'Publisher');
169is($doc->creation_date, "20000111", 'Creation date');
Nils Diewald19205712015-06-18 20:06:45 +0000170#ok(!$doc->coll_title, 'Collection title');
171#ok(!$doc->coll_sub_title, 'Collection subtitle');
172#ok(!$doc->coll_editor, 'Collection editor');
173#ok(!$doc->coll_author, 'Collection author');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000174ok(!$doc->text_type, 'text_type');
175is($doc->text_type_art, 'Bericht', 'text_type art');
176
Nils Diewald8e323ee2014-04-23 17:28:14 +0000177# A01/02873-meta
Akron29fc6b72016-01-28 14:17:15 +0100178$path = catdir(dirname(__FILE__), 'corpus/A00/02873-meta');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000179ok($doc = KorAP::Document->new( path => $path . '/' ), 'Load Korap::Document');
180
181ok($doc->parse, 'Parse document');
182is($doc->title, 'Tradition und Moderne', 'title');
183ok(!$doc->sub_title, 'subTitle');
Nils Diewald7ec51532014-10-28 19:51:26 +0000184is($doc->text_sigle, 'A00_JAN.02873', 'ID');
185is($doc->corpus_sigle, 'A00', 'corpusID');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000186is($doc->pub_date, '20000113', 'pubDate');
187ok(!$doc->pub_place, 'pubPlace');
188is($doc->text_class->[0], 'kultur', 'TextClass');
189is($doc->text_class->[1], 'film', 'TextClass');
190ok(!$doc->text_class->[2], 'TextClass');
Nils Diewald19205712015-06-18 20:06:45 +0000191ok(!$doc->author, 'author');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000192
Akron9d8cbc52016-01-27 21:47:57 +0100193
Nils Diewald8e323ee2014-04-23 17:28:14 +0000194# Additional information
195ok(!$doc->editor, 'Editor');
196ok(!$doc->publisher, 'Publisher');
197is($doc->creation_date, "20000113", 'Creation date');
Nils Diewald19205712015-06-18 20:06:45 +0000198#ok(!$doc->coll_title, 'Collection title');
199#ok(!$doc->coll_sub_title, 'Collection subtitle');
200#ok(!$doc->coll_editor, 'Collection editor');
201#ok(!$doc->coll_author, 'Collection author');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000202ok(!$doc->text_type, 'text_type');
203is($doc->text_type_art, 'Bericht', 'text_type art');
204
205
206# A01/05663-unbalanced
Akron29fc6b72016-01-28 14:17:15 +0100207$path = catdir(dirname(__FILE__), 'corpus/A00/05663-unbalanced');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000208ok($doc = KorAP::Document->new( path => $path . '/' ), 'Load Korap::Document');
209
210ok($doc->parse, 'Parse document');
211is($doc->title, 'Mehr Arbeitslose im Dezember', 'title');
212ok(!$doc->sub_title, 'subTitle');
Nils Diewald7ec51532014-10-28 19:51:26 +0000213is($doc->text_sigle, 'A00_JAN.05663', 'ID');
214is($doc->corpus_sigle, 'A00', 'corpusID');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000215is($doc->pub_date, '20000124', 'pubDate');
216ok(!$doc->pub_place, 'pubPlace');
217is($doc->text_class->[0], 'gesundheit-ernaehrung', 'TextClass');
218is($doc->text_class->[1], 'gesundheit', 'TextClass');
219ok(!$doc->text_class->[2], 'TextClass');
Nils Diewald19205712015-06-18 20:06:45 +0000220ok(!$doc->author, 'author');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000221
Akron9d8cbc52016-01-27 21:47:57 +0100222
Nils Diewald8e323ee2014-04-23 17:28:14 +0000223# Additional information
224ok(!$doc->editor, 'Editor');
225ok(!$doc->publisher, 'Publisher');
226is($doc->creation_date, "20000124", 'Creation date');
Nils Diewald19205712015-06-18 20:06:45 +0000227#ok(!$doc->coll_title, 'Collection title');
228#ok(!$doc->coll_sub_title, 'Collection subtitle');
229#ok(!$doc->coll_editor, 'Collection editor');
230#ok(!$doc->coll_author, 'Collection author');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000231ok(!$doc->text_type, 'text_type');
232is($doc->text_type_art, 'Bericht', 'text_type art');
233
234
Nils Diewald8e323ee2014-04-23 17:28:14 +0000235# A01/07452-deep
Akron29fc6b72016-01-28 14:17:15 +0100236$path = catdir(dirname(__FILE__), 'corpus/A00/07452-deep');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000237ok($doc = KorAP::Document->new( path => $path . '/' ), 'Load Korap::Document');
238
239ok($doc->parse, 'Parse document');
240is($doc->title, 'Wil im Dezember 1999', 'title');
241ok(!$doc->sub_title, 'subTitle');
Nils Diewald7ec51532014-10-28 19:51:26 +0000242is($doc->text_sigle, 'A00_JAN.07452', 'ID');
243is($doc->corpus_sigle, 'A00', 'corpusID');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000244is($doc->pub_date, '20000129', 'pubDate');
245ok(!$doc->pub_place, 'pubPlace');
246is($doc->text_class->[0], 'politik', 'TextClass');
247is($doc->text_class->[1], 'kommunalpolitik', 'TextClass');
248ok(!$doc->text_class->[2], 'TextClass');
Nils Diewald19205712015-06-18 20:06:45 +0000249ok(!$doc->author, 'author');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000250
Akron9d8cbc52016-01-27 21:47:57 +0100251
Nils Diewald8e323ee2014-04-23 17:28:14 +0000252# Additional information
253ok(!$doc->editor, 'Editor');
254ok(!$doc->publisher, 'Publisher');
255is($doc->creation_date, "20000129", 'Creation date');
Nils Diewald19205712015-06-18 20:06:45 +0000256#ok(!$doc->coll_title, 'Collection title');
257#ok(!$doc->coll_sub_title, 'Collection subtitle');
258#ok(!$doc->coll_editor, 'Collection editor');
259#ok(!$doc->coll_author, 'Collection author');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000260ok(!$doc->text_type, 'text_type');
261is($doc->text_type_art, 'Bericht', 'text_type art');
262
Nils Diewald98767bb2014-04-25 20:31:19 +0000263# ART
Akron29fc6b72016-01-28 14:17:15 +0100264$path = catdir(dirname(__FILE__), 'corpus/artificial');
Nils Diewald98767bb2014-04-25 20:31:19 +0000265ok($doc = KorAP::Document->new( path => $path . '/' ), 'Load Korap::Document');
Nils Diewald19205712015-06-18 20:06:45 +0000266#is($doc->path, $path . '/', 'Path');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000267
Nils Diewald98767bb2014-04-25 20:31:19 +0000268ok($doc = KorAP::Document->new( path => $path ), 'Load Korap::Document');
Nils Diewald19205712015-06-18 20:06:45 +0000269#is($doc->path, $path . '/', 'Path');
Nils Diewald98767bb2014-04-25 20:31:19 +0000270
271ok($doc->parse, 'Parse document');
272
273# Metdata
274is($doc->title, 'Artificial Title', 'title');
275is($doc->sub_title, 'Artificial Subtitle', 'subTitle');
Nils Diewald7ec51532014-10-28 19:51:26 +0000276is($doc->text_sigle, 'ART_ABC.00001', 'ID');
277is($doc->corpus_sigle, 'ART', 'corpusID');
Nils Diewald98767bb2014-04-25 20:31:19 +0000278is($doc->pub_date, '20010402', 'pubDate');
279is($doc->pub_place, 'Mannheim', 'pubPlace');
Akron9d8cbc52016-01-27 21:47:57 +0100280is($doc->pub_place_key, 'DE', 'pubPlace key');
Nils Diewald98767bb2014-04-25 20:31:19 +0000281is($doc->text_class->[0], 'freizeit-unterhaltung', 'TextClass');
282is($doc->text_class->[1], 'vereine-veranstaltungen', 'TextClass');
283ok(!$doc->text_class->[2], 'TextClass');
Nils Diewald19205712015-06-18 20:06:45 +0000284#is($doc->author->[0], 'Ruru', 'author');
285#is($doc->author->[1], 'Jens.Ol', 'author');
286#is($doc->author->[2], 'Aglarech', 'author');
287is($doc->author, 'Ruru; Jens.Ol; Aglarech; u.a.', 'author');
Nils Diewald98767bb2014-04-25 20:31:19 +0000288
289# Additional information
290is($doc->editor, 'Nils Diewald', 'Editor');
291is($doc->publisher, 'Artificial articles Inc.', 'Publisher');
292is($doc->creation_date, '19990601', 'Creation date');
Nils Diewald19205712015-06-18 20:06:45 +0000293#is($doc->coll_title, 'Artificial articles', 'Collection title');
294#is($doc->coll_sub_title, 'Best of!', 'Collection subtitle');
295#is($doc->coll_editor, 'Nils Diewald', 'Collection editor');
296#is($doc->coll_author, 'Nils Diewald', 'Collection author');
Nils Diewald98767bb2014-04-25 20:31:19 +0000297is($doc->text_type, 'Zeitung: Tageszeitung', 'No text_type');
298is($doc->text_type_art, 'Bericht', 'text_type art');
Nils Diewald8e323ee2014-04-23 17:28:14 +0000299
Nils Diewald19205712015-06-18 20:06:45 +0000300# Multipath headers
Akron29fc6b72016-01-28 14:17:15 +0100301$path = catdir(dirname(__FILE__), 'corpus/VDI/JAN/00001');
Nils Diewald19205712015-06-18 20:06:45 +0000302ok($doc = KorAP::Document->new( path => $path . '/' ), 'Load Korap::Document');
303like($doc->path, qr!$path/!, 'Path');
304
305ok($doc = KorAP::Document->new( path => $path ), 'Load Korap::Document');
306like($doc->path, qr!$path/$!, 'Path');
307
308ok($doc->parse, 'Parse document');
Akron9d8cbc52016-01-27 21:47:57 +0100309
310
311is($doc->text_sigle, 'VDI14_JAN.00001', 'text sigle');
312is($doc->doc_sigle, 'VDI14_JAN', 'doc sigle');
313is($doc->corpus_sigle, 'VDI14', 'corpus sigle');
314
Nils Diewald19205712015-06-18 20:06:45 +0000315is($doc->title, '10- Zz mit Zahl', 'title');
Akron9d8cbc52016-01-27 21:47:57 +0100316
Nils Diewald19205712015-06-18 20:06:45 +0000317ok(!$doc->sub_title, 'subtitle');
318is($doc->pub_date, '20140117', 'pubdate');
319is($doc->pub_place, 'Düsseldorf', 'pubplace');
320is($doc->author, 'Windhövel, Kerstin', 'author');
321is($doc->publisher, 'VDI Verlag GmbH', 'publisher');
322ok(!$doc->editor, 'editor');
323
324ok(!$doc->text_type, 'text type');
325ok(!$doc->text_type_art, 'text type art');
326ok(!$doc->text_type_ref, 'text type ref');
327ok(!$doc->text_column, 'text column');
328ok(!$doc->text_domain, 'text domain');
329ok(!$doc->creation_date, 'creation date');
330ok(!$doc->license, 'License');
331ok(!$doc->pages, 'Pages');
332ok(!$doc->file_edition_statement, 'file edition statement');
333ok(!$doc->bibl_edition_statement, 'bibl edition statement');
334is($doc->reference, 'VDI nachrichten, 17.01.2014, S. 10; 10- Zz mit Zahl [Ausführliche Zitierung nicht verfügbar]', 'Reference');
335
336ok(!$doc->language, 'Language');
Akron9d8cbc52016-01-27 21:47:57 +0100337# !!!
338# diag 'This may be "de" in the future';
Nils Diewald19205712015-06-18 20:06:45 +0000339
340is($doc->doc_title, 'VDI nachrichten, Januar 2014', 'Doc title');
341ok(!$doc->doc_sub_title, 'Doc Sub title');
342ok(!$doc->doc_editor, 'Doc editor');
343ok(!$doc->doc_author, 'Doc author');
344
Akron29fc6b72016-01-28 14:17:15 +0100345is($doc->corpus_title, 'VDI nachrichten', 'Corpus title');
Nils Diewald19205712015-06-18 20:06:45 +0000346ok(!$doc->corpus_sub_title, 'Corpus Sub title');
Akron29fc6b72016-01-28 14:17:15 +0100347is($doc->corpus_editor, 'Verein Deutscher Ingenieure', 'Corpus editor');
Nils Diewald19205712015-06-18 20:06:45 +0000348ok(!$doc->corpus_author, 'Corpus author');
349
350is($doc->keywords_string, '', 'Keywords');
351is($doc->text_class_string, 'Freizeit-Unterhaltung Reisen Politik Ausland', 'Text class');
352
Nils Diewald19205712015-06-18 20:06:45 +0000353# WDD
Akron29fc6b72016-01-28 14:17:15 +0100354$path = catdir(dirname(__FILE__), 'corpus/WDD/G27/38989');
Nils Diewald19205712015-06-18 20:06:45 +0000355ok($doc = KorAP::Document->new( path => $path . '/' ), 'Load Korap::Document');
356like($doc->path, qr!$path/!, 'Path');
357ok($doc->parse, 'Parse document');
358
359is($doc->text_sigle, 'WDD11_G27.38989', 'text sigle');
360is($doc->doc_sigle, 'WDD11_G27', 'doc sigle');
361is($doc->corpus_sigle, 'WDD11', 'corpus sigle');
362
363is($doc->title, 'Diskussion:Gunter A. Pilz', 'title');
364ok(!$doc->sub_title, 'subtitle');
365is($doc->pub_date, '20111029', 'pubdate');
366is($doc->pub_place, 'URL:http://de.wikipedia.org', 'pubplace');
367
368is($doc->author, '€pa, u.a.', 'author');
369is($doc->publisher, 'Wikipedia', 'publisher');
370ok(!$doc->editor, 'editor');
371
372is($doc->text_type, 'Diskussionen zu Enzyklopädie-Artikeln', 'text type');
373ok(!$doc->text_type_art, 'text type art');
374ok(!$doc->text_type_ref, 'text type ref');
375ok(!$doc->text_column, 'text column');
376ok(!$doc->text_domain, 'text domain');
377
378is($doc->creation_date, '20070707', 'creation date');
379is($doc->license, 'CC-BY-SA', 'License');
380ok(!$doc->pages, 'Pages');
381ok(!$doc->file_edition_statement, 'file edition statement');
382ok(!$doc->bibl_edition_statement, 'bibl edition statement');
383is($doc->reference, 'Diskussion:Gunter A. Pilz, In: Wikipedia - URL:http://de.wikipedia.org/wiki/Diskussion:Gunter_A._Pilz: Wikipedia, 2007', 'Reference');
384
385is($doc->language, 'de', 'Language');
386
387is($doc->doc_title, 'Wikipedia, Diskussionen zu Artikeln mit Anfangsbuchstabe G, Teil 27', 'Doc title');
388ok(!$doc->doc_sub_title, 'Doc Sub title');
389ok(!$doc->doc_editor, 'Doc editor');
390ok(!$doc->doc_author, 'Doc author');
391
Akron29fc6b72016-01-28 14:17:15 +0100392is($doc->corpus_title, 'Wikipedia', 'Corpus title');
Nils Diewald19205712015-06-18 20:06:45 +0000393ok(!$doc->corpus_sub_title, 'Corpus Sub title');
Akron29fc6b72016-01-28 14:17:15 +0100394is($doc->corpus_editor, 'wikipedia.org', 'Corpus editor');
Nils Diewald19205712015-06-18 20:06:45 +0000395ok(!$doc->corpus_author, 'Corpus author');
396
397is($doc->keywords_string, '', 'Keywords');
398is($doc->text_class_string, '', 'Text class');
399
Akron9d8cbc52016-01-27 21:47:57 +0100400
401is($doc->availability, 'CC-BY-SA', 'Availability');
402
403
Nils Diewald8e323ee2014-04-23 17:28:14 +0000404done_testing;
405__END__