mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-30 22:23:05 +00:00
Fix the ispunct ctype implementation.
This commit is contained in:
+1
-4
@@ -78,10 +78,7 @@ def isblank(data): # word separator
|
||||
return 0
|
||||
|
||||
def ispunct(data):
|
||||
if data.get('GeneralCategory', 'Cn')[0] in 'P':
|
||||
return 1
|
||||
else:
|
||||
return 0
|
||||
return 1 if isgraph(data) and not isalnum(data) else 0
|
||||
|
||||
def isprint(data):
|
||||
if data.get('GeneralCategory', 'Cn')[0] in 'LMNPSZ': # not in 'CI'
|
||||
|
||||
Reference in New Issue
Block a user