Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsumoto-ren committed Jun 6, 2024
1 parent 9459943 commit 93264b4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions japanese/reading.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,8 @@ def get_pronunciations(expr: str, sanitize: bool = True, recurse: bool = True, u
# Try to split the expression in various ways (punctuation, whitespace, etc.),
# and check if any of those brings results.
if not ret and recurse:
if len(split_expr := split_separators(expr)) > 1:
for section in split_expr:
ret.update(get_pronunciations_part(section, use_mecab=use_mecab))

for section in split_separators(expr):
ret.update(get_pronunciations_part(section, use_mecab=use_mecab))
return ret


Expand Down

0 comments on commit 93264b4

Please sign in to comment.