From f8a31cf13876cfdd0f80897e160f4f7e284afde2 Mon Sep 17 00:00:00 2001 From: kanasimi Date: Sat, 1 Jun 2024 16:02:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=8C=E8=A3=9Csrl=E7=9A=84=E8=B3=87?= =?UTF-8?q?=E8=A8=8A=E6=BC=8F=E5=A4=B1=20#699?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python/interface/ltp/nerual.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/interface/ltp/nerual.py b/python/interface/ltp/nerual.py index ef0d6491..63ba68bb 100644 --- a/python/interface/ltp/nerual.py +++ b/python/interface/ltp/nerual.py @@ -196,7 +196,7 @@ def pipeline( words = sentences[idx] new_store.append( [ - (tag, "".join(words[start : end + 1])) + (tag, "".join(words[start : end + 1]), start, end) for tag, start, end in get_entities(sent) ] ) @@ -209,12 +209,12 @@ def pipeline( for item, predicate in enumerate(words): arguments = [ - (tag, "".join(words[start : end + 1])) + (tag, "".join(words[start : end + 1]), start, end) for tag, start, end in get_entities(sent[item]) ] if arguments: new_store[-1].append( - {"predicate": predicate, "arguments": arguments} + {"index": item, "predicate": predicate, "arguments": arguments} ) store[task] = new_store