commit | 81dbe3b8d2740ad162fd5002e7b1426f216d5376 | [log] [tgz] |
---|---|---|
author | Akron <nils@diewald-online.de> | Tue Jun 25 07:47:24 2024 +0200 |
committer | Akron <nils@diewald-online.de> | Tue Jun 25 07:47:24 2024 +0200 |
tree | 68818531e4cdf03bb7c8c16e652e54b2d449fafe | |
parent | 82064bb982064ed24d25c122c7306ea520383e3c [diff] |
fix behaviour for missing attributes in utterances Change-Id: Ia2bd6bdce3e470fe74f8405958d89936eb1955c9
diff --git a/lib/KorAP/XML/Annotation/DeReKo/Structure.pm b/lib/KorAP/XML/Annotation/DeReKo/Structure.pm index 33e9af7..0352ff9 100644 --- a/lib/KorAP/XML/Annotation/DeReKo/Structure.pm +++ b/lib/KorAP/XML/Annotation/DeReKo/Structure.pm
@@ -118,7 +118,7 @@ my $data; foreach (@$attrs) { - $data = $_->{'#text'}; + $data = $_->{'#text'} or next; $data =~ s/</</g; $data =~ s/>/>/g;
diff --git a/t/real/corpus/KTC/001/000001/struct/structure.xml b/t/real/corpus/KTC/001/000001/struct/structure.xml index 45ae611..78be0ed 100644 --- a/t/real/corpus/KTC/001/000001/struct/structure.xml +++ b/t/real/corpus/KTC/001/000001/struct/structure.xml
@@ -189,7 +189,7 @@ <fs type="attr"> <f name="who">Mai Thi Nguyen-Kim</f> <f name="start">0:00</f> - <f name="end">01:20</f> + <f name="end"></f> </fs> </f> </fs> @@ -1894,4 +1894,4 @@ </fs> </span> </spanList> -</layer> \ No newline at end of file +</layer>