| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 1 | package KorAP::XML::Meta::I5; |
| 2 | use KorAP::XML::Meta::Base; |
| Akron | 2029455 | 2019-11-29 16:15:35 +0100 | [diff] [blame] | 3 | use Mojo::Util qw/url_escape/; |
| Akron | fbf6638 | 2016-07-12 19:44:01 +0200 | [diff] [blame] | 4 | |
| 5 | our $SIGLE_RE = qr/^([^_\/]+)(?:[_\/]([^\._\/]+?)(?:\.(.+?))?)?$/; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 6 | |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 7 | # STRING: |
| 8 | # "pubPlace", |
| 9 | # "textSigle", |
| 10 | # "docSigle", |
| 11 | # "corpusSigle", |
| 12 | # "textType", |
| 13 | # "textTypeArt", |
| 14 | # "textTypeRef", |
| 15 | # "textColumn", |
| 16 | # "textDomain", |
| 17 | # "availability", |
| 18 | # "language", |
| 19 | # "corpusID", // Deprecated! |
| 20 | # "ID" // Deprecated! |
| 21 | # |
| 22 | # TEXT: |
| 23 | # "author", |
| 24 | # "title", |
| 25 | # "subTitle", |
| 26 | # "corpusTitle", |
| 27 | # "corpusSubTitle", |
| 28 | # "corpusAuthor", |
| 29 | # "docTitle", |
| 30 | # "docSubTitle", |
| 31 | # "docAuthor" |
| 32 | # |
| 33 | # KEYWORDS: |
| 34 | # "textClass", |
| 35 | # "foundries", |
| 36 | # "keywords" |
| 37 | # |
| 38 | # STORE: |
| 39 | # "docEditor", |
| 40 | # "tokenSource", |
| 41 | # "layerInfos", |
| 42 | # "publisher", |
| 43 | # "editor", |
| 44 | # "fileEditionStatement", |
| 45 | # "biblEditionStatement", |
| 46 | # "reference", |
| 47 | # "corpusEditor" |
| Akron | 0d68a4b | 2019-11-13 15:42:11 +0100 | [diff] [blame] | 48 | # "distributor" |
| Akron | 26e7789 | 2022-05-16 17:59:29 +0200 | [diff] [blame] | 49 | # "internalLink" |
| 50 | # "externalLink" |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 51 | # |
| 52 | # DATE: |
| 53 | # "pubDate", |
| 54 | # "creationDate" |
| 55 | |
| 56 | |
| Akron | afb81ad | 2016-08-01 20:28:31 +0200 | [diff] [blame] | 57 | sub _squish ($) { |
| 58 | for ($_[0]) { |
| 59 | s!\s\s+! !g; |
| 60 | s!^\s*!!; |
| 61 | s!\s*$!!; |
| Akron | c388150 | 2017-01-20 14:36:37 +0100 | [diff] [blame] | 62 | s!^\-+$!!g; |
| Akron | afb81ad | 2016-08-01 20:28:31 +0200 | [diff] [blame] | 63 | }; |
| 64 | $_[0]; |
| 65 | }; |
| 66 | |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 67 | # Parse meta data |
| Akron | c893ac3 | 2018-07-18 17:59:02 +0200 | [diff] [blame] | 68 | # This will normally be parsed in the order corpus, doc, text |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 69 | sub parse { |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 70 | my ($self, $dom, $type) = @_; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 71 | |
| Akron | 64f7fae | 2022-07-27 12:45:33 +0200 | [diff] [blame] | 72 | my $lang = $self->lang; |
| 73 | |
| Akron | fbf6638 | 2016-07-12 19:44:01 +0200 | [diff] [blame] | 74 | # Parse text sigle |
| 75 | if ($type eq 'text' && !$self->text_sigle) { |
| 76 | my $v = $dom->at('textSigle'); |
| 77 | if ($v) { |
| Akron | afb81ad | 2016-08-01 20:28:31 +0200 | [diff] [blame] | 78 | $self->{_text_sigle} = _squish $v->text; |
| Akron | fbf6638 | 2016-07-12 19:44:01 +0200 | [diff] [blame] | 79 | if ($self->{_text_sigle} =~ $SIGLE_RE) { |
| Akron | 3ec0a1c | 2017-01-18 14:41:55 +0100 | [diff] [blame] | 80 | $self->{_text_sigle} = join('/', $1, $2, $3); |
| 81 | $self->{_doc_sigle} = join('/', $1, $2); |
| 82 | $self->{_corpus_sigle} = $1; |
| Akron | fbf6638 | 2016-07-12 19:44:01 +0200 | [diff] [blame] | 83 | }; |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | # Parse document sigle |
| 88 | elsif ($type eq 'doc' && !$self->doc_sigle) { |
| 89 | my $v = $dom->at('dokumentSigle'); |
| 90 | if ($v) { |
| 91 | $self->{_doc_sigle} = $v->text; |
| 92 | if ($self->{_doc_sigle} =~ $SIGLE_RE) { |
| Akron | 3ec0a1c | 2017-01-18 14:41:55 +0100 | [diff] [blame] | 93 | $self->{_doc_sigle} = join('/', $1, $2); |
| 94 | $self->{_corpus_sigle} = $1; |
| Akron | fbf6638 | 2016-07-12 19:44:01 +0200 | [diff] [blame] | 95 | }; |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | # Parse corpus sigle |
| 100 | elsif ($type eq 'corpus' && !$self->corpus_sigle) { |
| 101 | my $v = $dom->at('korpusSigle'); |
| 102 | $self->{_corpus_sigle} = $v->text if $v; |
| 103 | }; |
| 104 | |
| Akron | 7e2eb88 | 2017-01-18 17:28:07 +0100 | [diff] [blame] | 105 | # TODO: May have analytic AND monogr |
| 106 | foreach my $analytic ($dom->at('analytic'), $dom->at('monogr')) { |
| 107 | next unless $analytic; |
| 108 | # There is an analytic element |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 109 | |
| 110 | # Get title, subtitle, author, editor |
| Akron | 64f7fae | 2022-07-27 12:45:33 +0200 | [diff] [blame] | 111 | my $titles = $analytic->find('h\.title[type=main]'); |
| 112 | my $title; |
| 113 | if ($lang) { |
| 114 | $title = $titles->first(sub{ $_->attr('xml:lang') && lc($_->attr('xml:lang')) eq lc($lang) }); |
| 115 | }; |
| 116 | $title = $titles->first unless $title; |
| 117 | |
| 118 | my $sub_title; |
| 119 | $titles = $analytic->find('h\.title[type=sub]'); |
| 120 | if ($lang) { |
| 121 | $sub_title = $titles->first(sub{ $_->attr('xml:lang') && lc($_->attr('xml:lang')) eq lc($lang) }); |
| 122 | }; |
| 123 | $sub_title = $titles->first unless $sub_title; |
| 124 | |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 125 | my $author = $analytic->at('h\.author'); |
| 126 | my $editor = $analytic->at('editor'); |
| 127 | |
| Akron | a308c71 | 2017-06-16 16:37:01 +0200 | [diff] [blame] | 128 | #if ($analytic->find('editor')->size > 1) { |
| 129 | # warn 'Mehr als ein Editor!'; |
| 130 | # warn $analytic->find('editor')->join("\n"); |
| 131 | #}; |
| 132 | |
| 133 | #if ($analytic->find('author')->size > 1) { |
| 134 | # warn 'Mehr als ein Autor!'; |
| 135 | # warn $analytic->find('author')->join("\n"); |
| 136 | #}; |
| 137 | |
| Akron | 578af4b | 2017-01-20 16:28:50 +0100 | [diff] [blame] | 138 | # Editor contains translator |
| 139 | my $translator; |
| 140 | if ($editor && $editor->attr('role') && $editor->attr('role') eq 'translator') { |
| 141 | # Translator is only supported on the text level currently |
| Akron | a7d0e9f | 2017-02-03 14:36:21 +0100 | [diff] [blame] | 142 | $translator = _squish $editor->all_text; |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 143 | $self->{A_translator} = $translator if $translator; |
| Akron | 578af4b | 2017-01-20 16:28:50 +0100 | [diff] [blame] | 144 | $editor = undef; |
| 145 | } |
| 146 | else { |
| 147 | $editor = $editor ? _squish $editor->all_text : undef; |
| 148 | }; |
| 149 | |
| Akron | afb81ad | 2016-08-01 20:28:31 +0200 | [diff] [blame] | 150 | $title = $title ? _squish $title->all_text : undef; |
| 151 | $sub_title = $sub_title ? _squish $sub_title->all_text : undef; |
| 152 | $author = $author ? _squish $author->all_text : undef; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 153 | |
| Akron | 3c9b27c | 2022-03-04 13:08:13 +0100 | [diff] [blame] | 154 | if (my $temp = $analytic->at('biblNote[n="url"]')) { |
| 155 | my $url = _squish $temp->all_text; |
| 156 | my $title = $temp->attr('rend') || $url; |
| 157 | $self->{"A_${type}_external_link"} = $self->korap_data_uri($url, title => $title); |
| 158 | }; |
| 159 | |
| 160 | if (my $temp = $analytic->at('biblNote[n="url.ids"]')) { |
| 161 | my $url = _squish $temp->all_text; |
| 162 | my $title = $temp->attr('rend') || $url; |
| 163 | $self->{"A_${type}_internal_link"} = $self->korap_data_uri($url, title => $title); |
| 164 | }; |
| 165 | |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 166 | # Text meta data |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 167 | if ($type eq 'text') { |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 168 | unless ($self->{T_title} || $self->{T_sub_title}) { |
| 169 | $self->{T_title} = _remove_prefix($title, $self->text_sigle) if $title; |
| 170 | $self->{T_sub_title} = $sub_title if $sub_title; |
| Akron | 7e2eb88 | 2017-01-18 17:28:07 +0100 | [diff] [blame] | 171 | }; |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 172 | $self->{A_editor} //= $editor if $editor; |
| 173 | $self->{T_author} //= $author if $author; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 174 | } |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 175 | |
| 176 | # Doc meta data |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 177 | elsif ($type eq 'doc') { |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 178 | unless ($self->{T_doc_title} || $self->{T_doc_sub_title}) { |
| 179 | $self->{T_doc_title} //= _remove_prefix($title, $self->doc_sigle) if $title; |
| 180 | $self->{T_doc_sub_title} //= $sub_title if $sub_title; |
| Akron | 7e2eb88 | 2017-01-18 17:28:07 +0100 | [diff] [blame] | 181 | }; |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 182 | $self->{T_doc_author} //= $author if $author; |
| 183 | $self->{A_doc_editor} //= $editor if $editor; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 184 | } |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 185 | |
| 186 | # Corpus meta data |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 187 | elsif ($type eq 'corpus') { |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 188 | unless ($self->{T_corpus_title} || $self->{T_corpus_sub_title}) { |
| 189 | $self->{T_corpus_title} //= _remove_prefix($title, $self->corpus_sigle) if $title; |
| 190 | $self->{T_corpus_sub_title} //= $sub_title if $sub_title; |
| Akron | 7e2eb88 | 2017-01-18 17:28:07 +0100 | [diff] [blame] | 191 | }; |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 192 | $self->{T_corpus_author} //= $author if $author; |
| 193 | $self->{A_corpus_editor} //= $editor if $editor; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 194 | }; |
| 195 | }; |
| 196 | |
| 197 | # Not in analytic |
| Akron | 64f7fae | 2022-07-27 12:45:33 +0200 | [diff] [blame] | 198 | my ($titles, $title); |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 199 | if ($type eq 'corpus') { |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 200 | |
| 201 | # Corpus title not yet given |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 202 | unless ($self->{T_corpus_title}) { |
| Akron | 64f7fae | 2022-07-27 12:45:33 +0200 | [diff] [blame] | 203 | if ($titles = $dom->find('fileDesc > titleStmt > c\.title')) { |
| 204 | if ($lang) { |
| 205 | $title = $titles->first(sub{ $_->attr('xml:lang') && lc($_->attr('xml:lang')) eq lc($lang) }); |
| 206 | }; |
| 207 | |
| 208 | $title = $titles->first unless $title; |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 209 | |
| Akron | 3ec0a1c | 2017-01-18 14:41:55 +0100 | [diff] [blame] | 210 | if ($title) { |
| Akron | 64f7fae | 2022-07-27 12:45:33 +0200 | [diff] [blame] | 211 | $title = _squish($title->all_text); |
| 212 | |
| 213 | if ($title) { |
| 214 | $self->{T_corpus_title} = _remove_prefix($title, $self->corpus_sigle); |
| 215 | }; |
| Akron | 3ec0a1c | 2017-01-18 14:41:55 +0100 | [diff] [blame] | 216 | }; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 217 | }; |
| 218 | }; |
| 219 | } |
| 220 | |
| 221 | # doc title |
| 222 | elsif ($type eq 'doc') { |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 223 | unless ($self->{T_doc_title}) { |
| Akron | 64f7fae | 2022-07-27 12:45:33 +0200 | [diff] [blame] | 224 | if ($titles = $dom->find('fileDesc > titleStmt > d\.title')) { |
| 225 | if ($lang) { |
| 226 | $title = $titles->first(sub{ $_->attr('xml:lang') && lc($_->attr('xml:lang')) eq lc($lang) }); |
| 227 | }; |
| 228 | |
| 229 | $title = $titles->first unless $title; |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 230 | |
| Akron | 3ec0a1c | 2017-01-18 14:41:55 +0100 | [diff] [blame] | 231 | if ($title) { |
| Akron | 64f7fae | 2022-07-27 12:45:33 +0200 | [diff] [blame] | 232 | $title = _squish($title->all_text); |
| 233 | |
| 234 | if ($title) { |
| 235 | $self->{T_doc_title} = _remove_prefix($title, $self->doc_sigle); |
| 236 | }; |
| Akron | 3ec0a1c | 2017-01-18 14:41:55 +0100 | [diff] [blame] | 237 | }; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 238 | }; |
| 239 | }; |
| 240 | } |
| 241 | |
| 242 | # text title |
| 243 | elsif ($type eq 'text') { |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 244 | unless ($self->{T_title}) { |
| Marc Kupietz | 400590b | 2022-12-23 16:02:36 +0100 | [diff] [blame] | 245 | if ($titles = $dom->find('fileDesc > titleStmt > t\.title, fileDesc > titleStmt > title')) { |
| Akron | 64f7fae | 2022-07-27 12:45:33 +0200 | [diff] [blame] | 246 | if ($lang) { |
| 247 | $title = $titles->first(sub{ $_->attr('xml:lang') && lc($_->attr('xml:lang')) eq lc($lang) }); |
| Akron | 3ec0a1c | 2017-01-18 14:41:55 +0100 | [diff] [blame] | 248 | }; |
| Akron | 64f7fae | 2022-07-27 12:45:33 +0200 | [diff] [blame] | 249 | |
| 250 | $title = $titles->first unless $title; |
| 251 | |
| 252 | if ($title) { |
| 253 | $title = _squish($title->all_text); |
| 254 | |
| 255 | if ($title) { |
| 256 | $self->{T_title} = _remove_prefix($title, $self->text_sigle); |
| 257 | }; |
| 258 | }; |
| 259 | }; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 260 | }; |
| 261 | }; |
| 262 | |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 263 | my $temp; |
| 264 | |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 265 | # Get PubPlace |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 266 | if ($temp = $dom->at('pubPlace')) { |
| 267 | my $place_attr = $temp->attr('key'); |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 268 | $self->{S_pub_place_key} = $place_attr if $place_attr; |
| Akron | afb81ad | 2016-08-01 20:28:31 +0200 | [diff] [blame] | 269 | $temp = _squish $temp->all_text; |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 270 | $self->{S_pub_place} = $temp if $temp; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 271 | }; |
| 272 | |
| 273 | # Get Publisher |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 274 | if ($temp = $dom->at('imprint publisher')) { |
| Akron | afb81ad | 2016-08-01 20:28:31 +0200 | [diff] [blame] | 275 | $temp = _squish $temp->all_text; |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 276 | $self->{A_publisher} = $temp if $temp; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 277 | }; |
| 278 | |
| 279 | # Get text type |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 280 | $temp = $dom->at('textDesc'); |
| 281 | my $temp_2; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 282 | |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 283 | if ($temp) { |
| 284 | if ($temp_2 = $temp->at('textType')) { |
| Akron | afb81ad | 2016-08-01 20:28:31 +0200 | [diff] [blame] | 285 | $temp_2 = _squish $temp_2->all_text; |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 286 | $self->{S_text_type} = $temp_2 if $temp_2; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 287 | }; |
| 288 | |
| 289 | # Get text domain |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 290 | if ($temp_2 = $temp->at('textDomain')) { |
| Akron | afb81ad | 2016-08-01 20:28:31 +0200 | [diff] [blame] | 291 | $temp_2 = _squish $temp_2->all_text; |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 292 | $self->{S_text_domain} = $temp_2 if $temp_2; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 293 | }; |
| 294 | |
| 295 | # Get text type art |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 296 | if ($temp_2 = $temp->at('textTypeArt')) { |
| Akron | afb81ad | 2016-08-01 20:28:31 +0200 | [diff] [blame] | 297 | $temp_2 = _squish $temp_2->all_text; |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 298 | $self->{S_text_type_art} = $temp_2 if $temp_2; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 299 | }; |
| 300 | |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 301 | # Get text type ref |
| 302 | if ($temp_2 = $temp->at('textTypeRef')) { |
| Akron | afb81ad | 2016-08-01 20:28:31 +0200 | [diff] [blame] | 303 | $temp_2 = _squish $temp_2->all_text; |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 304 | $self->{S_text_type_ref} = $temp_2 if $temp_2; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 305 | }; |
| 306 | }; |
| 307 | |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 308 | state $NR_RE = qr/^\d+$/; |
| 309 | state $REF_RE = qr!^[a-zA-Z0-9]+\/[a-zA-Z0-9]+\.\d+[\s:]\s*!; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 310 | |
| 311 | # Get pubDate |
| 312 | my $pub_date = $dom->find('pubDate[type=year]'); |
| 313 | $pub_date->each( |
| 314 | sub { |
| 315 | my $x = shift->parent; |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 316 | my $year = $x->at('pubDate[type=year]') or return; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 317 | $year = $year ? $year->text : 0; |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 318 | my $month = $x->at('pubDate[type=month]'); |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 319 | $month = $month ? $month->text : 0; |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 320 | my $day = $x->at('pubDate[type=day]'); |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 321 | $day = $day ? $day->text : 0; |
| 322 | |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 323 | $year = 0 if $year !~ $NR_RE; |
| 324 | $month = 0 if $month !~ $NR_RE; |
| 325 | $day = 0 if $day !~ $NR_RE; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 326 | |
| Akron | 01c6fb5 | 2023-08-25 12:22:33 +0200 | [diff] [blame^] | 327 | my $date = '0000'; |
| 328 | if ($year) { |
| 329 | if (length($year) <= 2) { |
| 330 | # TEMP: This may change in the future! |
| 331 | if ($year < 50) { |
| 332 | $date = '20' . (length($year) == 1 ? '0' : '') . $year; |
| 333 | } else { |
| 334 | $date = '19' . $year; |
| 335 | }; |
| 336 | } |
| 337 | else { |
| 338 | $date = $year; |
| 339 | }; |
| 340 | }; |
| 341 | |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 342 | $date .= length($month) == 1 ? '0' . $month : $month; |
| 343 | $date .= length($day) == 1 ? '0' . $day : $day; |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 344 | $self->{D_pub_date} = $date; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 345 | }); |
| 346 | |
| 347 | # creatDate |
| 348 | my $create_date = $dom->at('creatDate'); |
| 349 | if ($create_date && $create_date->text) { |
| Akron | afb81ad | 2016-08-01 20:28:31 +0200 | [diff] [blame] | 350 | $create_date = _squish $create_date->all_text; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 351 | if (index($create_date, '-') > -1) { |
| 352 | $self->log->warn("Creation date ranges are not supported"); |
| 353 | ($create_date) = split /\s*-\s*/, $create_date; |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 354 | }; |
| 355 | unless ($create_date =~ s{^(\d{4})$}{$1\.00\.00}) { |
| 356 | unless ($create_date =~ s{^(\d{4})\.(\d{2})$}{$1\.$2\.00}) { |
| Akron | 3139917 | 2017-01-20 14:13:34 +0100 | [diff] [blame] | 357 | $create_date =~ /^\d{4}\.\d{2}\.\d{2}$/; |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 358 | }; |
| 359 | }; |
| 360 | if ($create_date =~ /^\d{4}(?:\.\d{2}(?:\.\d{2})?)?$/) { |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 361 | $create_date =~ tr/\.//d; |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 362 | $self->{D_creation_date} = $create_date; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 363 | }; |
| 364 | }; |
| 365 | |
| Akron | 0f9b93a | 2017-06-29 16:21:52 +0200 | [diff] [blame] | 366 | |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 367 | $temp = $dom->at('textClass'); |
| 368 | if ($temp) { |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 369 | # Get textClasses |
| 370 | my @topic; |
| 371 | |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 372 | $temp->find("catRef")->each( |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 373 | sub { |
| Akron | 2e840a7 | 2022-02-03 09:49:26 +0100 | [diff] [blame] | 374 | return unless $_->attr('target'); |
| Akron | a7d0e9f | 2017-02-03 14:36:21 +0100 | [diff] [blame] | 375 | my ($ign, @ttopic) = grep { $_ } map { _squish($_) } split('\.', $_->attr('target')); |
| Akron | 3139917 | 2017-01-20 14:13:34 +0100 | [diff] [blame] | 376 | push(@topic, @ttopic); |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 377 | } |
| 378 | ); |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 379 | $self->{K_text_class} = [@topic] if @topic > 0; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 380 | |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 381 | my $kws = $self->{K_keywords}; |
| Akron | a7d0e9f | 2017-02-03 14:36:21 +0100 | [diff] [blame] | 382 | my @keywords = $temp->find("h\.keywords > keyTerm")->map(sub {_squish($_) })->grep(sub { $_ })->each; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 383 | push(@$kws, @keywords) if @keywords > 0; |
| 384 | }; |
| 385 | |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 386 | if ($temp = $dom->at('biblFull editionStmt')) { |
| Akron | afb81ad | 2016-08-01 20:28:31 +0200 | [diff] [blame] | 387 | $temp = _squish $temp->all_text; |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 388 | $self->{A_bibl_edition_statement} = $temp if $temp; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 389 | }; |
| 390 | |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 391 | if ($temp = $dom->at('fileDesc')) { |
| Akron | 0d68a4b | 2019-11-13 15:42:11 +0100 | [diff] [blame] | 392 | my $temp2; |
| 393 | |
| Akron | 57799fc | 2020-02-11 11:42:33 +0100 | [diff] [blame] | 394 | if (my $editionStmt = $temp->at('editionStmt')) { |
| 395 | $temp2 = _squish $editionStmt->all_text; |
| 396 | $self->{A_file_edition_statement} = $temp2 if $temp2; |
| 397 | }; |
| 398 | |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 399 | if (my $availability = $temp->at('publicationStmt > availability')) { |
| Akron | 0d68a4b | 2019-11-13 15:42:11 +0100 | [diff] [blame] | 400 | $temp2 = _squish $availability->all_text; |
| 401 | $self->{S_availability} = $temp2 if $temp2; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 402 | }; |
| Akron | 0d68a4b | 2019-11-13 15:42:11 +0100 | [diff] [blame] | 403 | |
| 404 | if (my $distributor = $temp->at('publicationStmt > distributor')) { |
| 405 | $temp2 = _squish $distributor->all_text; |
| 406 | $self->{A_distributor} = $temp2 if $temp2; |
| 407 | } |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 408 | }; |
| 409 | |
| Akron | c893ac3 | 2018-07-18 17:59:02 +0200 | [diff] [blame] | 410 | if ($temp = $dom->at('profileDesc > langUsage > language[id]')) { |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 411 | $self->{S_language} = $temp->attr('id') if $temp->attr('id'); |
| Akron | c893ac3 | 2018-07-18 17:59:02 +0200 | [diff] [blame] | 412 | }; |
| 413 | |
| 414 | |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 415 | # Some meta data only available in the corpus |
| Akron | c893ac3 | 2018-07-18 17:59:02 +0200 | [diff] [blame] | 416 | #if ($type eq 'corpus') { |
| 417 | #} |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 418 | |
| 419 | # Some meta data only reevant from the text |
| Akron | c893ac3 | 2018-07-18 17:59:02 +0200 | [diff] [blame] | 420 | if ($type eq 'text') { |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 421 | |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 422 | if ($temp = $dom->at('sourceDesc reference[type=complete]')) { |
| Akron | afb81ad | 2016-08-01 20:28:31 +0200 | [diff] [blame] | 423 | if (my $ref_text = _squish $temp->all_text) { |
| Akron | 3139917 | 2017-01-20 14:13:34 +0100 | [diff] [blame] | 424 | $ref_text =~ s!$REF_RE!!; |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 425 | $self->{A_reference} = $ref_text; |
| Akron | 6bf3cc9 | 2019-02-07 12:11:20 +0100 | [diff] [blame] | 426 | |
| Akron | 2029455 | 2019-11-29 16:15:35 +0100 | [diff] [blame] | 427 | # In case of Wikipedia texts, take the URL |
| Akron | 6bf3cc9 | 2019-02-07 12:11:20 +0100 | [diff] [blame] | 428 | if ($ref_text =~ /URL:(http:.+?):\s+Wikipedia,\s+\d+\s*$/) { |
| Akron | 8ad06c4 | 2022-01-11 17:07:49 +0100 | [diff] [blame] | 429 | $self->{A_externalLink} = $self->korap_data_uri($1, title => 'Wikipedia'); |
| Akron | 6bf3cc9 | 2019-02-07 12:11:20 +0100 | [diff] [blame] | 430 | }; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 431 | }; |
| 432 | }; |
| 433 | |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 434 | $temp = $dom->at('textDesc > column'); |
| Akron | afb81ad | 2016-08-01 20:28:31 +0200 | [diff] [blame] | 435 | if ($temp && ($temp = _squish $temp->all_text)) { |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 436 | $self->{S_text_column} = $temp; |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 437 | }; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 438 | |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 439 | if ($temp = $dom->at('biblStruct biblScope[type=pp]')) { |
| Akron | afb81ad | 2016-08-01 20:28:31 +0200 | [diff] [blame] | 440 | $temp = _squish $temp->all_text; |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 441 | if ($temp && $temp =~ m/(\d+)\s*-\s*(\d+)/) { |
| Akron | 5eb3aa0 | 2019-01-25 18:30:47 +0100 | [diff] [blame] | 442 | $self->{A_src_pages} = $1 . '-' . $2; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 443 | }; |
| 444 | }; |
| Akron | 2029455 | 2019-11-29 16:15:35 +0100 | [diff] [blame] | 445 | |
| 446 | # DGD treatment |
| Akron | 67b6eda | 2019-12-13 15:50:23 +0100 | [diff] [blame] | 447 | if ($self->{T_title} && !$self->{A_externalLink} && $self->{_corpus_sigle} =~ /^(?:[AD]GD|FOLK)$/) { |
| Akron | 2029455 | 2019-11-29 16:15:35 +0100 | [diff] [blame] | 448 | my $transcript = $self->{T_title}; |
| 449 | $transcript =~ s/_DF_\d+$//i; |
| Akron | 8ad06c4 | 2022-01-11 17:07:49 +0100 | [diff] [blame] | 450 | $self->{A_externalLink} = $self->korap_data_uri( |
| Akron | 2029455 | 2019-11-29 16:15:35 +0100 | [diff] [blame] | 451 | 'https://dgd.ids-mannheim.de/DGD2Web/ExternalAccessServlet?command=displayData&id=' . |
| Akron | 8ad06c4 | 2022-01-11 17:07:49 +0100 | [diff] [blame] | 452 | url_escape($transcript), title => 'DGD'); |
| Akron | 2029455 | 2019-11-29 16:15:35 +0100 | [diff] [blame] | 453 | } |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 454 | }; |
| Akron | fbf6638 | 2016-07-12 19:44:01 +0200 | [diff] [blame] | 455 | |
| 456 | return 1; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 457 | }; |
| 458 | |
| 459 | |
| 460 | sub _remove_prefix { |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 461 | # This may render some titles wrong, e.g. 'VDI nachrichten 2014' ... |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 462 | return $_[0] unless $_[1]; |
| 463 | |
| 464 | my ($title, $prefix) = @_; |
| Akron | 1cd5b87 | 2016-03-22 00:23:46 +0100 | [diff] [blame] | 465 | # $prefix =~ tr!_!/!; |
| 466 | $prefix =~ s!^([^/]+?/[^/]+?)/!$1\.!; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 467 | if (index($title, $prefix) == 0) { |
| 468 | $title = substr($title, length($prefix)); |
| Akron | 0465de5 | 2017-02-07 22:30:08 +0100 | [diff] [blame] | 469 | $title =~ s!^\s*[-;:,]\s*!!; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 470 | }; |
| Akron | 6396c30 | 2016-03-18 16:05:39 +0100 | [diff] [blame] | 471 | |
| Akron | afb81ad | 2016-08-01 20:28:31 +0200 | [diff] [blame] | 472 | return _squish $title; |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 473 | }; |
| 474 | |
| 475 | |
| Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 476 | 1; |
| Akron | 57799fc | 2020-02-11 11:42:33 +0100 | [diff] [blame] | 477 | |
| Akron | d4c5c10 | 2020-02-11 11:47:59 +0100 | [diff] [blame] | 478 | |
| 479 | __END__ |
| 480 | |
| 481 | =pod |
| 482 | |
| 483 | =encoding utf8 |
| 484 | |
| 485 | =head1 NAME |
| 486 | |
| 487 | KorAP::XML::Meta::I5 - Parses I5 meta data of a KorAP-XML document |
| 488 | |
| 489 | =head1 DESCRIPTION |
| 490 | |
| 491 | Parses I5 meta data of a KorAP-XML document. |
| 492 | |
| 493 | Following the data model, all 3 levels of metadata are parsed, while not all |
| 494 | metadata levels contain the same information. The precedence is that metadata |
| 495 | defined on the text level will override metadata on the document level. And |
| 496 | metadata on the document level will override metadata on the corpus level. |
| 497 | |
| 498 | =head2 Metadata categories |
| 499 | |
| 500 | Krill currently supports the following types of metadata to be indexed. |
| 501 | They differ especially in the way they can be used to construct a virtual corpus. |
| 502 | |
| 503 | =over 2 |
| 504 | |
| 505 | =item B<String> |
| 506 | |
| 507 | A simple string representation of a meta data field. Useful for fixed values, |
| 508 | such as I<corpusSigle> or I<language>. |
| 509 | |
| 510 | =item B<Text> |
| 511 | |
| 512 | A string representation that will be indexed as a text, so fulltext search |
| 513 | (like phrase search) is supported. Useful for values where partial matches are |
| 514 | useful, like I<title> or I<author>. |
| 515 | |
| 516 | =item B<Keywords> |
| 517 | |
| 518 | Multiple string representations. Identical to string, but supports multiple |
| 519 | values in the same field. Useful for multiple given values such as I<textClass>. |
| 520 | |
| 521 | =item B<Attachement> |
| 522 | |
| 523 | Values that can't be used for the construction of virtual corpora, but are stored |
| 524 | per document and can be retrieved. Useful for static data to be retrieved such as |
| 525 | I<reference> or I<externalLink>. |
| 526 | |
| 527 | =item B<Date> |
| 528 | |
| 529 | A representation of a date, that can later be used for date range queries to construct |
| 530 | virtual corpora. Useful for all date related information, such as I<pubDate> or I<createDate>. |
| 531 | |
| 532 | =back |
| 533 | |
| 534 | =head2 Metadata fields |
| 535 | |
| 536 | Currently L<KorAP::XML::Meta::I5> recognizes and transfers the following fields, given as |
| 537 | a SCSS selector rule (plus C<@> for attribute values) followed by the field name and |
| 538 | the metadata category. |
| 539 | The order may indicate a field to be overwritten. |
| 540 | |
| 541 | =over 2 |
| 542 | |
| 543 | =item B<On all levels> |
| 544 | |
| 545 | (analytic, monogr) editor[role=translator] translator ATTACHEMENT |
| 546 | pubPlace@key pubPlaceKey STRING |
| 547 | pubPlace pubPlace STRING |
| 548 | imprint publisher publisher ATTACHEMENT |
| 549 | textDesc textType textType STRING |
| 550 | textDesc textDomain textDomain STRING |
| 551 | textDesc textTypeArt textTypeArt STRING |
| 552 | textDesc textTypeRef textTypeRef STRING |
| 553 | pubDate[type=year] |
| 554 | & pubDate[type=month] |
| 555 | & pubDate[type=day] pubDate DATE |
| 556 | creatDate creationDate DATE |
| 557 | textClass catRef@target textClass KEYWORDS |
| Akron | 0a187b9 | 2020-03-16 12:49:58 +0100 | [diff] [blame] | 558 | textClass h\.keywords > keyTerm keywords KEYWORDS |
| Akron | d4c5c10 | 2020-02-11 11:47:59 +0100 | [diff] [blame] | 559 | biblFull editionStmt biblEditionStatement ATTACHEMENT |
| 560 | fileDesc editionStmt fileEditionStatement ATTACHEMENT |
| 561 | fileDesc publicationStmt > availability availability STRING |
| 562 | fileDesc publicationStmt > distributor distributor ATTACHEMENT |
| 563 | profileDesc > langUsage > language[id]@id language STRING |
| 564 | |
| 565 | =item B<On text level> |
| 566 | |
| 567 | textSigle textSigle STRING |
| Akron | 0a187b9 | 2020-03-16 12:49:58 +0100 | [diff] [blame] | 568 | fileDesc > titleStmt > t\.title title TEXT |
| 569 | (analytic, monogr) h\.title[type=main] title TEXT |
| 570 | (analytic, monogr) h\.title[type=sub] subTitle TEXT |
| 571 | (analytic, monogr) h\.author author TEXT |
| Akron | d4c5c10 | 2020-02-11 11:47:59 +0100 | [diff] [blame] | 572 | (analytic, monogr) editor[role!=translator] editor ATTACHEMENT |
| 573 | sourceDesc reference[type=complete] reference ATTACHEMENT |
| 574 | textDesc > column textColumn STRING |
| 575 | biblStruct biblScope[type=pp] srcPages ATTACHEMENT |
| Akron | 26e7789 | 2022-05-16 17:59:29 +0200 | [diff] [blame] | 576 | biblNote[n=url] textExternalLink |
| 577 | & @rend ATTACHEMENT |
| 578 | biblNote[n="url.ids"] textInternalLink |
| 579 | & @rend ATTACHEMENT |
| Akron | d4c5c10 | 2020-02-11 11:47:59 +0100 | [diff] [blame] | 580 | |
| 581 | =item B<On document level> |
| 582 | |
| 583 | dokumentSigle docSigle STRING |
| Akron | 0a187b9 | 2020-03-16 12:49:58 +0100 | [diff] [blame] | 584 | fileDesc > titleStmt > d\.title docTitle TEXT |
| 585 | (analytic, monogr) h\.title[type=main] docTitle TEXT |
| 586 | (analytic, monogr) h\.title[type=sub] docSubTitle TEXT |
| 587 | (analytic, monogr) h\.author docAuthor TEXT |
| Akron | d4c5c10 | 2020-02-11 11:47:59 +0100 | [diff] [blame] | 588 | (analytic, monogr) editor[role!=translator] docEditor ATTACHEMENT |
| Akron | 26e7789 | 2022-05-16 17:59:29 +0200 | [diff] [blame] | 589 | biblNote[n=url] docExternalLink |
| 590 | & @rend ATTACHEMENT |
| 591 | biblNote[n="url.ids"] docInternalLink |
| 592 | & @rend ATTACHEMENT |
| Akron | d4c5c10 | 2020-02-11 11:47:59 +0100 | [diff] [blame] | 593 | |
| 594 | =item B<On corpus level> |
| 595 | |
| 596 | korpusSigle corpusSigle STRING |
| Akron | 0a187b9 | 2020-03-16 12:49:58 +0100 | [diff] [blame] | 597 | fileDesc > titleStmt > c\.title corpusTitle TEXT |
| 598 | (analytic, monogr) h\.title[type=main] corpusTitle TEXT |
| 599 | (analytic, monogr) h\.title[type=sub] corpusSubTitle TEXT |
| 600 | (analytic, monogr) h\.author corpusAuthor TEXT |
| Akron | d4c5c10 | 2020-02-11 11:47:59 +0100 | [diff] [blame] | 601 | (analytic, monogr) editor[role!=translator] corpusEditor ATTACHEMENT |
| Akron | 26e7789 | 2022-05-16 17:59:29 +0200 | [diff] [blame] | 602 | biblNote[n=url] corpusExternalLink |
| 603 | & @rend ATTACHEMENT |
| 604 | biblNote[n="url.ids"] corpudInternalLink |
| 605 | & @rend ATTACHEMENT |
| Akron | d4c5c10 | 2020-02-11 11:47:59 +0100 | [diff] [blame] | 606 | |
| 607 | =back |
| 608 | |
| 609 | Some fields are specially formated, like C<srcPages> or dates. |
| 610 | In case of Wikipedia texts, C<sourceDesc reference[type=complete]> will be |
| 611 | turned into an C<externalLink>. In case of DGD/AGD documents, an external link |
| 612 | to the DGD will be created as C<externalLink>. |
| 613 | |
| 614 | |
| 615 | =head1 AVAILABILITY |
| 616 | |
| 617 | https://github.com/KorAP/KorAP-XML-Krill |
| 618 | |
| 619 | |
| 620 | =head1 COPYRIGHT AND LICENSE |
| 621 | |
| 622 | Copyright (C) 2015-2020, L<IDS Mannheim|https://www.ids-mannheim.de/> |
| 623 | Author: L<Nils Diewald|https://nils-diewald.de/> |
| 624 | |
| 625 | KorAP::XML::Krill is developed as part of the |
| 626 | L<KorAP|https://korap.ids-mannheim.de/> |
| 627 | Corpus Analysis Platform at the |
| 628 | L<Institute for the German Language (IDS)|https://www.ids-mannheim.de/>, |
| 629 | member of the |
| 630 | L<Leibniz-Gemeinschaft|https://www.leibniz-gemeinschaft.de/en/> |
| 631 | and supported by the L<KobRA|http://www.kobra.tu-dortmund.de> project, |
| 632 | funded by the |
| 633 | L<Federal Ministry of Education and Research (BMBF)|http://www.bmbf.de/en/>. |
| 634 | |
| 635 | KorAP::XML::Krill is free software published under the |
| 636 | L<BSD-2 License|https://raw.githubusercontent.com/KorAP/KorAP-XML-Krill/master/LICENSE>. |
| 637 | |
| 638 | =cut |