def summarize(name, data): name = name.lower() name = CANONICAL.get(name, name) func = NAMES[name] return func(data)
def __init__(self, name, pm=None): name = name.lower() name = CANONICAL.get(name, name) name = CONJUGATE_NAMES.get(name, name) self.mod = NAMES[name] self.pm = self.mod.create_p(pm)