From d94329b369e3181077efada65212814dd5e1a5d1 Mon Sep 17 00:00:00 2001 From: hanhxiao Date: Mon, 2 Sep 2019 11:10:44 +0800 Subject: [PATCH] fix(preprocess): fix offset in sentence splitter --- gnes/preprocessor/text/split.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnes/preprocessor/text/split.py b/gnes/preprocessor/text/split.py index 5aa2b7a6..5e89838e 100644 --- a/gnes/preprocessor/text/split.py +++ b/gnes/preprocessor/text/split.py @@ -53,6 +53,6 @@ def apply(self, doc: 'gnes_pb2.Document') -> None: c = doc.chunks.add() c.doc_id = doc.doc_id c.text = f[:self.max_sent_len] - c.offset_1d = ci + c.offset = ci c.weight = len(c.text) / len(doc.raw_text) c.offset_nd.extend([s, e])