<commit_before>import Tkinter as tk
import ttk as ttk
import ScrolledText
import time

from chatterbot import ChatBot

class TkinterGUIExample(tk.Tk):

    def __init__(self, *args, **kwargs):
        '''
        Create & set window variables.
        '''
        tk.Tk.__init__(self, *args, **kwargs)

        self.chatbot = ChatBot("No Output",
            storage_adapter="chatterbot.adapters.storage.JsonDatabaseAdapter",
            logic_adapters=[
                "chatterbot.adapters.logic.ClosestMatchAdapter"
            ],
            input_adapter="chatterbot.adapters.input.VariableInputTypeAdapter",
            output_adapter="chatterbot.adapters.output.OutputFormatAdapter",
            database="../database.db"
        )

        self.title("Chatterbot")
<commit_msg>Make the example compatible with python3<commit_after>import tkinter as tk
try:
    import ttk as ttk
    import ScrolledText
except ImportError:
    import tkinter.ttk as ttk
    import tkinter.scrolledtext as ScrolledText
import time

from chatterbot import ChatBot

class TkinterGUIExample(tk.Tk):

    def __init__(self, *args, **kwargs):
        '''
        Create & set window variables.
        '''
        tk.Tk.__init__(self, *args, **kwargs)

        self.chatbot = ChatBot("No Output",
            storage_adapter="chatterbot.adapters.storage.JsonDatabaseAdapter",
            logic_adapters=[
                "chatterbot.adapters.logic.ClosestMatchAdapter"
            ],
            input_adapter="chatterbot.adapters.input.VariableInputTypeAdapter",
            output_adapter="chatterbot.adapters.output.OutputFormatAdapter",
            database="../database.db"
        )

        self.title("Chatterbot")

{'fraction_non_alphanumeric': 0.09718969555035128, 'fraction_numerical': 0.000585480093676815, 'mean_word_length': 2.5978947368421053, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2190678', 'n_tokens_mistral': 503, 'n_tokens_neox': 478, 'n_words': 94}