Skip to content

Commit 9d01c1e

Browse files
committed
Support awards in I5
Change-Id: I9b270d6259e24c8e0d5aa3698c3ec608ec082f69
1 parent 81dbe3b commit 9d01c1e

File tree

5 files changed

+17
-1
lines changed

5 files changed

+17
-1
lines changed

Changes

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
0.57 2024-07-25
2+
- Support award notes in i5.
3+
14
0.56 2024-06-05
25
- Add support für corpusexplorer.
36

lib/KorAP/XML/Krill.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use Exporter 'import';
1616

1717
our @EXPORT_OK = qw(get_file_name get_file_name_from_glob);
1818

19-
our $VERSION = '0.56';
19+
our $VERSION = '0.57';
2020

2121
has 'path';
2222
has [qw/text_sigle doc_sigle corpus_sigle/];

lib/KorAP/XML/Meta/I5.pm

+8
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,13 @@ sub parse {
501501
};
502502
};
503503

504+
$dom->find('biblStruct > note[type=award][subtype]')->each(
505+
sub {
506+
$self->{K_award} //= [];
507+
push @{$self->{K_award}}, $_->attr('subtype');
508+
}
509+
);
510+
504511
# DGD treatment
505512
if ($self->{T_title} && !$self->{A_externalLink} && $self->{_corpus_sigle} =~ /^(?:[AD]GD|FOLK)$/) {
506513
my $transcript = $self->{T_title};
@@ -631,6 +638,7 @@ The order may indicate a field to be overwritten.
631638
sourceDesc reference[type=complete] reference ATTACHMENT
632639
textDesc > column textColumn STRING
633640
biblStruct biblScope[type=pp] srcPages ATTACHMENT
641+
biblStruct > note[type=award][subtype] award KEYWORD
634642
biblNote[n=url] textExternalLink
635643
& @rend ATTACHMENT
636644
biblNote[n="url.ids"] textInternalLink

t/real/bzk_2.t

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ is($meta->{S_pub_place}, 'Berlin', 'PubPlace');
3838
is($meta->{D_pub_date}, '19590219', 'PubDate');
3939
ok(!$meta->{A_publisher}, 'Publisher');
4040

41+
is($meta->{K_award}->[0], 'Deutscher Buchpreis 2023', 'Award');
42+
is($meta->{K_award}->[1], 'Booker price 2024', 'Award');
43+
4144
is($meta->{S_text_type}, 'Zeitung: Tageszeitung', 'Correct Text Type');
4245

4346
ok(!$meta->{S_text_type_art}, 'Correct Text Type Art');

t/real/corpus/BZK/D59/00089/header.xml

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
<biblScope type="issue"/>
3535
<biblScope type="issueplace">Berliner Ausgabe</biblScope>
3636
</monogr>
37+
<note type="award" subtype="Deutscher Buchpreis 2023"/>
38+
<note type="award" subtype="Booker price 2024"/>
3739
</biblStruct>
3840
<reference type="complete" assemblage="regular">BZK/D59.00089 Neues Deutschland, [Tageszeitung], 19.02.1959, Jg. 14, Berliner Ausgabe, S. 7. - Sachgebiet: Politik, Originalressort: POLITIK; Saragat-Partei zerfällt</reference>
3941
<reference type="short" assemblage="regular">BZK/D59.00089 Neues Deutschland, 19.02.1959, S. 7</reference>

0 commit comments

Comments
 (0)