Exemplo n.º 1
0
def preparetokens(config, tokens):
    if config.colorizedpinyingeneration:
        tokens = transformations.colorize(config.tonecolors, tokens)

    return model.flatten(tokens, tonify=config.shouldtonify)
Exemplo n.º 2
0
 def generatecoloredcharacters(self, expression):
     return model.flatten(transformations.colorize(self.config.tonecolors, transformations.tonesandhi(self.dictionary.tonedchars(expression))))
Exemplo n.º 3
0
 def expressiondictreading2color(self, expression, dictreading):
     return model.flatten(transformations.colorize(self.config.tonecolors, model.tonedcharactersfromreading(expression, dictreading)))
Exemplo n.º 4
0
 def generatecoloredcharacters(self, expression):
     return model.flatten(
         transformations.colorize(
             self.config.tonecolors,
             transformations.tonesandhi(
                 self.dictionary.tonedchars(expression))))
Exemplo n.º 5
0
def preparetokens(config, tokens):
    if config.colorizedpinyingeneration:
        tokens = transformations.colorize(config.tonecolors, tokens)

    return model.flatten(tokens, tonify=config.shouldtonify)
Exemplo n.º 6
0
 def expressiondictreading2color(self, expression, dictreading):
     return model.flatten(transformations.colorize(self.config.tonecolors, model.tonedcharactersfromreading(expression, dictreading)))