Cleanup: Remove $_GEN_TOK_EXT
Change-Id: Iabc6a1815b2769c9a753aa822d74ab2f6fa95180
diff --git a/script/tei2korapxml b/script/tei2korapxml
index 8d15173..aad3006 100755
--- a/script/tei2korapxml
+++ b/script/tei2korapxml
@@ -89,9 +89,6 @@
my $_TEXT_HEADER_BEG = "idsHeader type=\"text\""; # analog
-## extern tokenization
-my $_GEN_TOK_EXT = $tokenizer_call || $tokenizer_korap ? 1 : 0;
-
if ($use_tokenizer_sentence_splits && !$tokenizer_korap) {
die $log->fatal("Sentence splitting is currently only supported by KorAP tokenizer (use -tk to activate it");
}
@@ -306,7 +303,7 @@
);
# ~ tokenization ~
- if ($_GEN_TOK_EXT) {
+ if ($ext_tok) {
# Tokenize and output
$ext_tok->tokenize($data->data)->to_zip(
@@ -334,7 +331,7 @@
if ($use_tokenizer_sentence_splits) {
$ext_tok->sentencize_from_previous_input($structures);
- }
+ };
# ~ write structures ~
if (!$structures->empty) {
@@ -433,7 +430,7 @@
$zipper->close;
-$ext_tok->close if $_GEN_TOK_EXT;
+$ext_tok->close if $ext_tok;
exit(0);