mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-12-03 23:09:52 +00:00
Add ASCII_Hex_Digit support from PropList.txt.
This commit is contained in:
+12
-11
@@ -120,17 +120,18 @@ def decomposition_type(data, dtype):
|
||||
return None
|
||||
|
||||
def properties(data):
|
||||
props = 0
|
||||
props += 1 * data.get('White_Space', 0)
|
||||
props += 2 * (decomposition_type(data, '<noBreak>') != None)
|
||||
props += 4 * data.get('Bidi_Control', 0)
|
||||
props += 8 * data.get('Join_Control', 0)
|
||||
props += 16 * data.get('Dash', 0)
|
||||
props += 32 * data.get('Hyphen', 0)
|
||||
props += 64 * data.get('Quotation_Mark', 0)
|
||||
props += 128 * data.get('Terminal_Punctuation', 0)
|
||||
props += 256 * data.get('Other_Math', 0)
|
||||
props += 512 * data.get('Hex_Digit', 0)
|
||||
props = 0
|
||||
props += 1 * data.get('White_Space', 0)
|
||||
props += 2 * (decomposition_type(data, '<noBreak>') != None)
|
||||
props += 4 * data.get('Bidi_Control', 0)
|
||||
props += 8 * data.get('Join_Control', 0)
|
||||
props += 16 * data.get('Dash', 0)
|
||||
props += 32 * data.get('Hyphen', 0)
|
||||
props += 64 * data.get('Quotation_Mark', 0)
|
||||
props += 128 * data.get('Terminal_Punctuation', 0)
|
||||
props += 256 * data.get('Other_Math', 0)
|
||||
props += 512 * data.get('Hex_Digit', 0)
|
||||
props += 1024 * data.get('ASCII_Hex_Digit', 0)
|
||||
return props
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user