diff --git a/src/tagger.py b/src/tagger.py index a806c9c8d51e7272e0e876d3f995a400b39aa2e6..b659dd351ba4df814ef0bf7882a688642809f131 100644 --- a/src/tagger.py +++ b/src/tagger.py @@ -137,10 +137,11 @@ class TaggerWorker(nlp_ws.NLPWorker): _dir_style = True json_lpmn = [json_lpmn] - with open(input_path, "r", encoding="utf-8") as f: - text = f.read(50) - if text.startswith("<?xml version='1.0' encoding='UTF-8'?>"): - _tei_style = True + if not _dir_style: + with open(input_path, "r", encoding="utf-8") as f: + text = f.read(50) + if text.startswith("<?xml version='1.0' encoding='UTF-8'?>"): + _tei_style = True _log.error(f"{_dir_style=} {_tei_style=}")