From 80cf64abcf8bf53d813fd4490fb2320fe91ff7e1 Mon Sep 17 00:00:00 2001 From: Kai Labusch Date: Tue, 12 Nov 2024 15:15:52 +0100 Subject: [PATCH] make code more robust --- qurator/tsvtools/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qurator/tsvtools/cli.py b/qurator/tsvtools/cli.py index 901ac49..252ee00 100644 --- a/qurator/tsvtools/cli.py +++ b/qurator/tsvtools/cli.py @@ -346,7 +346,7 @@ def tsv2tsv(tsv_in_file, tsv_out_file, ner_rest_endpoint, noproxy, prev_pos = 0 for idx, _ in tsv_out.iterrows(): - if prev_pos != 0 and not tsv_out.loc[idx, 'NE-TAG'].startswith('I-') and \ + if prev_pos != 0 and not str(tsv_out.loc[idx, 'NE-TAG']).startswith('I-') and \ tsv_out.loc[idx, 'No.'] == 0 or len(tsv_out.loc[idx, 'TOKEN']) == 0: word_pos = 0