def lemma_from_lexemes(lexemes,
                       separator=' '):
    """
    given a list of dictionaries, each dictionary
    representing a lexeme,
    reconstruct the lemma

    :param list lexemes: list of dictionaries
    :param string separator: how to join
    the lexemes if 'breakBefore' = 'false'

    :rtype: str
    :return: the lemma
    """
    order_to_lexeme = {}

    for lexeme in lexemes:
        order = int(lexeme['order'])
        order_to_lexeme[order] = lexeme

    parts = []
    for order, lexeme in order_to_lexeme.items():
        if lexeme['breakBefore'] == 'true':
            part = lexeme['name'] + separator
        else:
            part = lexeme['name']

        parts.append(part)

    lemma = ''.join(parts)
    return lemma