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