Sentencize only if ext_tok is available
Change-Id: I0b1b1ce3e724a546caeab7524b6cf353aeaf0dda
diff --git a/script/tei2korapxml b/script/tei2korapxml
index 561c824..70289f4 100755
--- a/script/tei2korapxml
+++ b/script/tei2korapxml
@@ -299,6 +299,10 @@
$zipper->new_stream("$dir/$base_dir/${tokens_file}.xml"),
$text_id_esc
);
+
+ if ($use_tokenizer_sentence_splits) {
+ $ext_tok->sentencize_from_previous_input($structures);
+ };
};
# Tokenize with internal tokenizer
@@ -319,10 +323,6 @@
$cons_tok->reset;
};
- if ($use_tokenizer_sentence_splits) {
- $ext_tok->sentencize_from_previous_input($structures);
- };
-
# ~ write structures ~
if (!$structures->empty) {
$structures->to_zip(