/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: RnnTextHelper.hpp * Author: jens * * Created on 18. Januar 2022, 19:12 */ #ifndef RNNTEXTHELPER_HPP #define RNNTEXTHELPER_HPP #include class RnnTextHelper { public: RnnTextHelper(); RnnTextHelper(const RnnTextHelper& orig) = delete; virtual ~RnnTextHelper(); const char punctuation[5] = {' ', '.', '!', '?', 0}; static constexpr int NUM_CODES = 1 + 26 + 10; static constexpr int SEQ_LENGTH = 2; static int char_is(char c, const char *pTable); static int ch2idx(char c); static char idx2ch(int index); static arma::mat createTraining(const std::string &filename, size_t seq_len); private: }; #endif /* RNNTEXTHELPER_HPP */