mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-24 20:31:15 +00:00
Merge commit '6346ede604270202b2aad8159cb914b7a2276c34'
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# Copyright (C) 2012-2014 Reece H. Dunn
|
||||
# Copyright (C) 2012-2017 Reece H. Dunn
|
||||
#
|
||||
# This file is part of ucd-tools.
|
||||
#
|
||||
@@ -50,6 +50,9 @@ class CodePoint:
|
||||
def __lt__(self, other):
|
||||
return self.codepoint < other.codepoint
|
||||
|
||||
def char(self):
|
||||
return unichr(self.codepoint)
|
||||
|
||||
class CodeRange:
|
||||
def __init__(self, x):
|
||||
f, l = x.split('..')
|
||||
@@ -69,6 +72,9 @@ class CodeRange:
|
||||
def size(self):
|
||||
return self.last.codepoint - self.first.codepoint + 1
|
||||
|
||||
def char(self):
|
||||
return unichr(self.first.codepoint)
|
||||
|
||||
def codepoint(x):
|
||||
if '..' in x[0]:
|
||||
return CodeRange(x[0]), x[1:]
|
||||
@@ -107,6 +113,10 @@ data_items = {
|
||||
('Range', codepoint),
|
||||
('Age', string),
|
||||
],
|
||||
'DerivedCoreProperties': [
|
||||
('Range', codepoint),
|
||||
('Property', string),
|
||||
],
|
||||
'PropList': [
|
||||
('Range', codepoint),
|
||||
('Property', string),
|
||||
|
||||
Reference in New Issue
Block a user