# Path: linguistica/util.py
# NULL = 'NULL'


from linguistica.util import NULL
            for x in range(len(this_word)):
                this_piece += this_word[x]
                if x + 1 in break_list:
                    broken_words[this_word].append(this_piece)
                    this_piece = ''
            if this_piece:
                broken_words[this_word].append(this_piece)

    return broken_words


def get_successors(wordlist, broken_words):
    successors = dict()
    for this_word in wordlist:
        this_word_parsed = broken_words[this_word]

        number_of_pieces = len(this_word_parsed)

        if not this_word_parsed:
            successors[this_word] = {NULL}
            continue
        word_being_built = this_word_parsed[0]

        if word_being_built not in successors:
            successors[word_being_built] = set()

        for j in range(1, number_of_pieces):
            new_piece = this_word_parsed[j]
            if word_being_built not in successors:
                successors[word_being_built] = set()

# Path: linguistica/util.py
# NULL = 'NULL'


# Path: linguistica/trie.py
from linguistica.util import NULL

            for x in range(len(this_word)):
                this_piece += this_word[x]
                if x + 1 in break_list:
                    broken_words[this_word].append(this_piece)
                    this_piece = ''
            if this_piece:
                broken_words[this_word].append(this_piece)

    return broken_words


def get_successors(wordlist, broken_words):
    successors = dict()
    for this_word in wordlist:
        this_word_parsed = broken_words[this_word]

        number_of_pieces = len(this_word_parsed)

        if not this_word_parsed:
            successors[this_word] = {NULL}
            continue
        word_being_built = this_word_parsed[0]

        if word_being_built not in successors:
            successors[word_being_built] = set()

        for j in range(1, number_of_pieces):
            new_piece = this_word_parsed[j]
            if word_being_built not in successors:
                successors[word_being_built] = set()

            successors[word_being_built].add(new_piece)