Skip to content

Commit

Permalink
Merge pull request #196 from megagonlabs/feature/improve_bunsetu_span
Browse files Browse the repository at this point in the history
improve bunsetu span
  • Loading branch information
hiroshi-matsuda-rit authored Oct 15, 2021
2 parents 31a22bc + 185c4ae commit ad46e8b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ Please read the official documents to compile user dictionaries with `sudachipy`

### version 5.x

#### ginza-5.0.3
- 2021-10-15
- Bug fix
- `Bunsetu span should not cross the sentence boundary` #195

#### ginza-5.0.2
- 2021-09-06
- Bug fix
Expand Down
5 changes: 5 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ Contains information from mC4 which is made available under the ODC Attribution

### version 5.x

#### ginza-5.0.3
- 2021-10-15
- Bug fix
- `Bunsetu span should not cross the sentence boundary` #195

#### ginza-5.0.2
- 2021-09-06
- Bug fix
Expand Down
2 changes: 1 addition & 1 deletion ginza/bunsetu_recognizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def bunsetu_span(token: Token) -> Span:
start = token.i
end = start + 1
for idx in range(start, 0, -1):
if bunsetu_bi_list[idx] == "B":
if bunsetu_bi_list[idx] == "B" or token.doc[idx].is_sent_start:
start = idx
break
else:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
name="ginza",
packages=find_packages(include=["ginza"]),
url="https://github.com/megagonlabs/ginza",
version='5.0.2',
version='5.0.3',
)

0 comments on commit ad46e8b

Please sign in to comment.