def show_results(results, n=10, print_results=True):
    """Show the top-n results of a classification."""
    s = ''
    if len(results) == 0:
        s += '-- No results --'
    else:
        s += '{0:18s} {1:7s}\n'.format('Class', 'Prob')
        s += '#' * 50 + '\n'
        for entry in results:
            if n == 0:
                break
            else:
                n -= 1
            s += '{0:18s} {1:>7.4f}%\n'.format(entry['semantics'], entry[
                'probability'] * 100)
        s += '#' * 50
    if print_results:
        print(s)
    return s
