def __init__(self, args):
        """
        Load the ontology and database, create some patterns, and preprocess
        the database so that we avoid some computations at runtime.

        :param args:
        """
        super(SlotFillingNLU, self).__init__()

        self.ontology = None
        self.database = None
        self.requestable_only_slots = None
        self.slot_values = None

        if 'ontology' not in args:
            raise AttributeError('SlotFillingNLU: Please provide ontology!')
        if 'database' not in args:
            raise AttributeError('SlotFillingNLU: Please provide database!')

        ontology = args['ontology']
        database = args['database']

        if isinstance(ontology, Ontology):
            self.ontology = ontology
        elif isinstance(ontology, str):
            self.ontology = Ontology(ontology)
        else:
            raise ValueError('Unacceptable ontology type %s ' % ontology)

        if database:
            if isinstance(database, DataBase):
                self.database = database

            elif isinstance(database, str):
                if database[-3:] == '.db':
                    self.database = SQLDataBase(database)
                elif database[-5:] == '.json':
                    self.database = JSONDataBase(database)
                else:
                    raise ValueError('Unacceptable database type %s '
                                     % database)
            else:
                raise ValueError('Unacceptable database type %s ' % database)

        # In order to work for simulated users, we need access to possible
        # values of requestable slots
        cursor = self.database.SQL_connection.cursor()

        print('SlotFillingNLU: Preprocessing Database... '
              '(do not use SlotFillingNLU with large databases!)')

        # Get table name
        db_result = cursor.execute("select * from sqlite_master "
                                   "where type = 'table';").fetchall()
        if db_result and db_result[0] and db_result[0][1]:
            db_table_name = db_result[0][1]

            self.slot_values = {}

            # Get all entries in the database
            all_items = cursor.execute("select * from " +
                                       db_table_name + ";").fetchall()

            i = 0

            for item in all_items:
                # Get column names
                slot_names = [i[0] for i in cursor.description]

                result = dict(zip(slot_names, item))

                for slot in result:
                    if slot in ['id', 'signature', 'description']:
                        continue

                    if slot not in self.slot_values:
                        self.slot_values[slot] = []

                    if result[slot] not in self.slot_values[slot]:
                        self.slot_values[slot].append(result[slot])

                i += 1
                if i % 2000 == 0:
                    print(f'{float(i/len(all_items))*100}% done')

            print('SlotFillingNLU: Done!')
        else:
            raise ValueError(
                'dialogue Manager cannot specify Table Name from database '
                '{0}'.format(self.database.db_file_name))

        # For this SlotFillingNLU create a list of requestable-only to reduce
        # computational load
        self.requestable_only_slots = \
            [slot for slot in self.ontology.ontology['requestable']
             if slot not in self.ontology.ontology['informable']] + ['name']

        self.bye_pattern = ['bye', 'goodbye', 'exit', 'quit', 'stop']

        self.hi_pattern = ['hi', 'hello']

        self.welcome_pattern = ['welcome', 'how may i help']

        self.deny_pattern = ['no']

        self.negate_pattern = ['is not']

        self.confirm_pattern = ['so is']

        self.repeat_pattern = ['repeat']

        self.ack_pattern = ['ok']

        self.restart_pattern = ['start over']

        self.affirm_pattern = ['yes']

        self.thankyou_pattern = ['thank you']

        self.reqmore_pattern = ['tell me more']

        self.expl_conf_pattern = ['alright']

        self.reqalts_pattern = ['anything else']

        self.select_pattern = ['you prefer']

        self.dontcare_pattern = ['anything', 'any', 'i do not care',
                                 'i dont care', 'dont care', 'dontcare',
                                 'it does not matter', 'it doesnt matter',
                                 'does not matter', 'doesnt matter']

        self.request_pattern = ['what', 'which', 'where', 'how', 'would']

        self.cant_help_pattern = ['can not help', 'cannot help', 'cant help']

        punctuation = string.punctuation.replace('$', '')
        punctuation = punctuation.replace('_', '')
        punctuation = punctuation.replace('.', '')
        punctuation = punctuation.replace('&', '')
        punctuation = punctuation.replace('-', '')
        punctuation += '.'
        self.punctuation_remover = str.maketrans('', '', punctuation)

        Load the ontology and database, create some patterns, and preprocess
        the database so that we avoid some computations at runtime.

        :param args:
        
plato/agent/component/nlu/slot_filling_nlu.py