'Given a word, returns a list of pieces, broken at the possible
hyphenation points.'

def hyphenate_word(self, word):

    if (len(word) <= 4):
        return [word]
    if (word.lower() in self.exceptions):
        points = self.exceptions[word.lower()]
    else:
        work = (('.' + word.lower()) + '.')
        points = ([0] * (len(work) + 1))
        for i in range(len(work)):
            t = self.tree
            for c in work[i:]:
                if (c in t):
                    t = t[c]
                    if (None in t):
                        p = t[None]
                        for j in range(len(p)):
                            points[(i + j)] = max(points[(i + j)], p[j])
                else:
                    break
        points[1] = points[2] = points[(-2)] = points[(-3)] = 0
    pieces = ['']
    for (c, p) in zip(word, points[2:]):
        pieces[(-1)] += c
        if (p % 2):
            pieces.append('')
    return pieces
