def template_parsing(self, lines):
    if isinstance(lines, basestring):
        lines = lines.splitlines()
    unigrams = unigram_splitter(lines, splitter=template_splitter)
    return list(template_processor(unigrams))
def template_parsing(self, lines):
    if isinstance(lines, basestring):
        lines = lines.splitlines()
    unigrams = unigram_splitter(lines, splitter=template_splitter)
    return list(template_processor(unigrams))