2korapxml: Print input and output filenames in warnings
... as well as line number, to be able to localise errors.
Change-Id: I58b401a0432b1c21e273793b08cd76553be63a2d
diff --git a/script/conllu2korapxml b/script/conllu2korapxml
index eb381c4..c8e4ec0 100755
--- a/script/conllu2korapxml
+++ b/script/conllu2korapxml
@@ -138,10 +138,10 @@
} elsif ( !/^\s*$/ ) {
if ( !$docid || scalar @spansTo == 0 || scalar @spansFrom == 0 ) {
if ( !$docid ) {
- $log->warn("WARNING: No valid input document: text_id (e.g. '# text_id = GOE_AGA.00000') missing");
+ $log->warn("WARNING: Invalid input in $conllu_file: text_id (e.g. '# text_id = GOE_AGA.00000') missing in line $. when writing to $outh");
}
if ( scalar @spansTo == 0 || scalar @spansFrom == 0 ) {
- $log->warn("WARNING: No valid input document: token offsets missing");
+ $log->warn("WARNING: Invalid input in $conllu_file: token offsets missing in line $. when writing to $outh");
}
# Skip to next potentially valid document