preprocessing.py
def preprocess(self):
        """Executes the preprocessing which generates the data used for learning
        """
        print('Starting Preprocessing Phase...')
        start = datetime.datetime.now()
        raw_data = FileHelper.read_data_lower(
            self.config['preprocessing']['input_file'])
        # Model the characters as integers
        char2intDict = self.generate_char_to_int_dictionary(raw_data)
        # FileHelper.save_object_to_file('preprocessingCheckpoints/char2indexDict', char2indexDict)
        FileHelper.save_object_to_file(
            self.config['preprocessing']['checkpoints']['char2intDict_file'], char2intDict)
        int2CharDict = self.generate_int_to_char_dictionary(raw_data)
        FileHelper.save_object_to_file(
            self.config['preprocessing']['checkpoints']['int2charDict_file'], int2CharDict)

        # Generate the text patterns
        X, Y = self.generate_training_patterns(raw_data, char2intDict)
        end = datetime.datetime.now()
        deltaTime = end-start
        print('Preprocessing finished: %ds' % deltaTime.total_seconds())

        return X, Y, char2intDict, int2CharDict
Executes the preprocessing which generates the data used for learning
        
Executes the preprocessing which generates the data used for learning
Executes the preprocessing which generates the data used for learning
def preprocess(self):
        print('Starting Preprocessing Phase...')
        start = datetime.datetime.now()
        raw_data = FileHelper.read_data_lower(
            self.config['preprocessing']['input_file'])
        char2intDict = self.generate_char_to_int_dictionary(raw_data)
        FileHelper.save_object_to_file(
            self.config['preprocessing']['checkpoints']['char2intDict_file'], char2intDict)
        int2CharDict = self.generate_int_to_char_dictionary(raw_data)
        FileHelper.save_object_to_file(
            self.config['preprocessing']['checkpoints']['int2charDict_file'], int2CharDict)
        X, Y = self.generate_training_patterns(raw_data, char2intDict)
        end = datetime.datetime.now()
        deltaTime = end-start
        print('Preprocessing finished: %ds' % deltaTime.total_seconds())
        return X, Y, char2intDict, int2CharDict
def preprocess ( self ) : print ( 'Starting Preprocessing Phase...' ) start = datetime . datetime . now ( ) raw_data = FileHelper . read_data_lower ( self . config [ 'preprocessing' ] [ 'input_file' ] ) char2intDict = self . generate_char_to_int_dictionary ( raw_data ) FileHelper . save_object_to_file ( self . config [ 'preprocessing' ] [ 'checkpoints' ] [ 'char2intDict_file' ] , char2intDict ) int2CharDict = self . generate_int_to_char_dictionary ( raw_data ) FileHelper . save_object_to_file ( self . config [ 'preprocessing' ] [ 'checkpoints' ] [ 'int2charDict_file' ] , int2CharDict ) X , Y = self . generate_training_patterns ( raw_data , char2intDict ) end = datetime . datetime . now ( ) deltaTime = end - start print ( 'Preprocessing finished: %ds' % deltaTime . total_seconds ( ) ) return X , Y , char2intDict , int2CharDict
Executes the preprocessing which generates the data used for learning
Executes the preprocessing which generates the data used for learning
"""Executes the preprocessing which generates the data used for learning
        """ # Model the characters as integers # FileHelper.save_object_to_file('preprocessingCheckpoints/char2indexDict', char2indexDict) # Generate the text patterns
self