Skip to content

Commit

Permalink
彌補srl的資訊漏失 HIT-SCIR#699
Browse files Browse the repository at this point in the history
  • Loading branch information
kanasimi authored Jun 1, 2024
1 parent 17f689c commit f8a31cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/interface/ltp/nerual.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
]
)
Expand All @@ -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

Expand Down

0 comments on commit f8a31cf

Please sign in to comment.