Skip to content

Commit

Permalink
Support awards in I5
Browse files Browse the repository at this point in the history
Change-Id: I9b270d6259e24c8e0d5aa3698c3ec608ec082f69
  • Loading branch information
Akron committed Jul 26, 2024
1 parent 81dbe3b commit 9d01c1e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.57 2024-07-25
- Support award notes in i5.

0.56 2024-06-05
- Add support für corpusexplorer.

Expand Down
2 changes: 1 addition & 1 deletion lib/KorAP/XML/Krill.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use Exporter 'import';

our @EXPORT_OK = qw(get_file_name get_file_name_from_glob);

our $VERSION = '0.56';
our $VERSION = '0.57';

has 'path';
has [qw/text_sigle doc_sigle corpus_sigle/];
Expand Down
8 changes: 8 additions & 0 deletions lib/KorAP/XML/Meta/I5.pm
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,13 @@ sub parse {
};
};

$dom->find('biblStruct > note[type=award][subtype]')->each(
sub {
$self->{K_award} //= [];
push @{$self->{K_award}}, $_->attr('subtype');
}
);

# DGD treatment
if ($self->{T_title} && !$self->{A_externalLink} && $self->{_corpus_sigle} =~ /^(?:[AD]GD|FOLK)$/) {
my $transcript = $self->{T_title};
Expand Down Expand Up @@ -631,6 +638,7 @@ The order may indicate a field to be overwritten.
sourceDesc reference[type=complete] reference ATTACHMENT
textDesc > column textColumn STRING
biblStruct biblScope[type=pp] srcPages ATTACHMENT
biblStruct > note[type=award][subtype] award KEYWORD
biblNote[n=url] textExternalLink
& @rend ATTACHMENT
biblNote[n="url.ids"] textInternalLink
Expand Down
3 changes: 3 additions & 0 deletions t/real/bzk_2.t
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ is($meta->{S_pub_place}, 'Berlin', 'PubPlace');
is($meta->{D_pub_date}, '19590219', 'PubDate');
ok(!$meta->{A_publisher}, 'Publisher');

is($meta->{K_award}->[0], 'Deutscher Buchpreis 2023', 'Award');
is($meta->{K_award}->[1], 'Booker price 2024', 'Award');

is($meta->{S_text_type}, 'Zeitung: Tageszeitung', 'Correct Text Type');

ok(!$meta->{S_text_type_art}, 'Correct Text Type Art');
Expand Down
2 changes: 2 additions & 0 deletions t/real/corpus/BZK/D59/00089/header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
<biblScope type="issue"/>
<biblScope type="issueplace">Berliner Ausgabe</biblScope>
</monogr>
<note type="award" subtype="Deutscher Buchpreis 2023"/>
<note type="award" subtype="Booker price 2024"/>
</biblStruct>
<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>
<reference type="short" assemblage="regular">BZK/D59.00089 Neues Deutschland, 19.02.1959, S. 7</reference>
Expand Down

0 comments on commit 9d01c1e

Please sign in to comment.