From b63512bf3119acf388c84bd3d6f75d245be8c13a Mon Sep 17 00:00:00 2001 From: Sorami Hisamoto Date: Fri, 19 Jun 2020 09:11:51 +0900 Subject: [PATCH] Fix latttice node related access due to Cythonization #133 --- sudachipy/morphemelist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sudachipy/morphemelist.py b/sudachipy/morphemelist.py index 59e9240..c60ae53 100644 --- a/sudachipy/morphemelist.py +++ b/sudachipy/morphemelist.py @@ -72,9 +72,9 @@ def split(self, mode, index, wi): nodes = [] for wid in word_ids: n = latticenode.LatticeNode(self.lexicon, 0, 0, 0, wid) - n.begin = offset + n.set_begin(offset) offset += n.get_word_info().head_word_length - n.end = offset + n.set_end(offset) nodes.append(n) return MorphemeList(self.input_text, self.grammar, self.lexicon, nodes)