Skip to content

Commit

Permalink
Merge pull request #38 from AlongWY/master
Browse files Browse the repository at this point in the history
🐛[BugFix]fix get enitity
  • Loading branch information
Hironsan authored Sep 30, 2020
2 parents 5e624d7 + b8a2a98 commit 679a7c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions seqeval/metrics/sequence_labeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ def _validate_chunk(chunk, suffix):

if suffix:
tag = chunk[-1]
type_ = chunk.split('-')[0]
type_ = chunk[:-1].rsplit('-', maxsplit=1)[0] or '_'
else:
tag = chunk[0]
type_ = chunk.split('-')[-1]
type_ = chunk[1:].split('-', maxsplit=1)[-1] or '_'

if end_of_chunk(prev_tag, tag, prev_type, type_):
chunks.append((prev_type, begin_offset, i-1))
Expand Down

0 comments on commit 679a7c5

Please sign in to comment.