def _output_text(complete_output, categories):
    """Output the results obtained in text format.

    :return: str, html formatted output
    """
    output = ''
    for result in complete_output:
        list_result = complete_output[result]
        if list_result:
            list_result_sorted = sorted(list_result, key=lambda x:
                list_result[x], reverse=True)
            output += '\n\n{0}:\n'.format(result)
            for element in list_result_sorted:
                output += '\n{0} {1}'.format(list_result[element], element)
    output += '\n--'
    return output
