commit | 31ec1286d8ebe4bce15830bb3746eb415754e98a | [log] [tgz] |
---|---|---|
author | Nils Diewald <nils@diewald-online.de> | Mon Nov 03 22:16:15 2014 +0000 |
committer | Nils Diewald <nils@diewald-online.de> | Mon Nov 03 22:16:15 2014 +0000 |
tree | 310e8fb86ed28083368834106a3fd424dccd0fc9 | |
parent | 27e9965c3336e1ba3e96d33ae09082e0473f0ed9 [diff] |
Consistent offset checks for spans and tokens
diff --git a/lib/KorAP/Tokenizer/Units.pm b/lib/KorAP/Tokenizer/Units.pm index 8130cb9..baa9ed2 100644 --- a/lib/KorAP/Tokenizer/Units.pm +++ b/lib/KorAP/Tokenizer/Units.pm
@@ -14,6 +14,8 @@ ($from, $to) = $self->_offset($from, $to); + return if !$to; + $from ||= 0; return unless $to > $from; my $span = KorAP::Tokenizer::Span->new;