Minor fix for broken offsets
diff --git a/lib/KorAP/Tokenizer.pm b/lib/KorAP/Tokenizer.pm
index cbaae8c..9ff8c51 100644
--- a/lib/KorAP/Tokenizer.pm
+++ b/lib/KorAP/Tokenizer.pm
@@ -279,7 +279,8 @@
if ($cb) {
foreach (@$spanarray) {
- $cb->($self->stream, $_); #, $spans);
+ $cb->($self->stream, $_) if defined $_->p_start;
+ #, $spans);
};
return 1;
};
@@ -325,7 +326,8 @@
if ($cb) {
foreach (@$tokenarray) {
- $cb->($self->stream, $_); #, $tokens);
+ $cb->($self->stream, $_) if defined $_->pos;
+ #, $tokens);
};
return 1;
};