def parse_to_conll(parse_tree):
    """
    Convert from the syntaxnet output format to a CoNLL-U format.
    """
    out_str = ''
    for i, token in enumerate(parse_tree.token, 1):
        if token.head == -1:
            head = 0
        else:
            head = token.head + 1
        pos1, pos2 = token.tag.split('attribute')[-1].split('value')[-1].replace(': "', '').replace('" } ', '').split('++')
        out_str += '{}\t{}\t-\t{}\t{}\t-\t{}\t{}\t-\t-\n'.format(i, token.word, pos1, pos2, head, token.label)

    return out_str