🐛 Fix word segmentation with uniseg 0.8.0

pull/111/head
Mike Gerber 9 months ago
parent 4b64398cec
commit 4d4ead4cc8

@ -1,7 +1,7 @@
click click
jinja2 jinja2
lxml lxml
uniseg >= 0.7.2 uniseg >= 0.8.0
numpy numpy
colorama colorama
MarkupSafe MarkupSafe

@ -24,7 +24,7 @@ def patch_word_break():
def new_word_break(c, index=0): def new_word_break(c, index=0):
if 0xE000 <= ord(c) <= 0xF8FF: # Private Use Area if 0xE000 <= ord(c) <= 0xF8FF: # Private Use Area
return "ALetter" return uniseg.wordbreak.WordBreak.ALETTER
else: else:
return old_word_break(c, index) return old_word_break(c, index)

Loading…
Cancel
Save