Browse Source

tools: support espeak-ng based annotations files

master
Reece H. Dunn 7 years ago
parent
commit
3d94190f89
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      tools/emoji

+ 5
- 3
tools/emoji View File



filenames = [ filenames = [
os.path.join(cldr_path, "common", "annotations", "{0}.xml".format(lang)), os.path.join(cldr_path, "common", "annotations", "{0}.xml".format(lang)),
os.path.join(cldr_path, "common", "annotationsDerived", "{0}.xml".format(lang))
os.path.join(cldr_path, "common", "annotationsDerived", "{0}.xml".format(lang)),
os.path.join("data", "annotationsEspeak", "{0}.xml".format(lang))
] ]


annotations = {} annotations = {}
for filename in filenames: for filename in filenames:
for cp, name in read_annotations(filename):
annotations[cp] = name
if os.path.exists(filename):
for cp, name in read_annotations(filename):
annotations[cp] = name


for entry in read_emoji(emoji_dict): for entry in read_emoji(emoji_dict):
if isinstance(entry, Emoji): if isinstance(entry, Emoji):

Loading…
Cancel
Save