Repository navigation
v0.2.0
Between Versions v0.1.0 and v0.2.0, many new features have been added throughout 26 commits. There are so many features that I will employ a numbered list, sorted by significance, instead of paragraphs.
- User-Defined and Multiple Default Corpus Support: Now, there are multiple default corpora, as opposed to just one. At the moment, there are 10, consisting of things such as the complete works of William Shakespeare, Mark Twain, and Charles Dickens, every single United States Presidential Inaugural Speech, the Linux Kernel Documentation, and more. Users can also load their own corpora by file path. This can be done with the command
/load <type> <file>. Run /load help to view the types. The corpora start with a special format that starts off with a special file signature, then includes some default settings between the signature and the delimiter at the end (===). Here is how a heading looks:
io.github.tyleruploads.corpustein:corpus-file
name: The name of the Corpus
default_order: An integer between 1 and 8 representing the order of the n-gram model
max_sentence_count: An integer representing the maximum sentences for each models output, which also will scale up the maximum tokens and the token history container.
===
- /set command: A new command,
/set, has been defined. It contains options to change the delay between each character typewritten to the screen (which is an additional feature in it of itself), the order of the N-gram model, the maximum sentence count for the N-gram model, and if the alternate terminal buffer should be enabled (another additional feature in it of itself). - /stats command: An all new
/statscommand has been added! It outputs the name of the current corpus, along with many other things such as the tokens in said corpus, the unique N-gram contexts that occurred as a result of the corpus and the order, and some variables not inherently associated with the corpus, like the maximum sentence count and more. - Typewriting Text to Screen: Instead of the text being sent to the screen instantly with
std::cout << ...;, a custom typewriter function has been made that iterates over every character in the string and waits a bit in between printing each character (defined as a function parameter). This is controlled by the/set delay <integer>command. - Enable/Disable Alternate Terminal Buffer: There is no scrolling in the alternate terminal buffer, and the output goes away when you exit the app. The purpose of the alternate terminal buffer is to make Corpustein more accomplished in an aesthetic sense. But, some users may prioritize scrolling and keeping the output of the program—especially when they have configured the maximum sentence count to a number closer to the hardstop maximum at 50—and want to disable the alternate terminal buffer. They can do so with the following command:
/set altbuffer <boolean>. - Redirecting Fake Commands: Previously, if a user entered just a plain slash, or a slash with a fake command after it, Corpustein would still respond. But now, if a user does this, it will redirect them to the /help command, which lists available commands.
- Static Assertion and Preprocessor Directive Right at the Top: Right at the top of the code, a preprocessor directive and static assertion has been added (the static assertion is not in the preprocessor directive). The static assertion ensures it is being compiled with C++20 or higher. The preprocessor directive invokes an error when APP_VERSION is not defined, which prevents a big wall of fatal errors being shown to the user with no context. APP_VERSION is automatically passed by CMake.
Full Changelog: v0.1.0...v0.2.0