<commit_before>package de.dj_steam.bot.cli;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Optional;

import org.apache.commons.lang3.StringUtils;

import de.dj_steam.bot.domain.Command;
import de.dj_steam.bot.engine.RobotEngine;

/**
 * @author steam
 */

public class LoopingConsole {

    private static final String EXIT_COMMAND = "exit";
    public static final String COMMAND_DELIMITER = " ";

    public static void main(final String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        printUsageBanner();

        RobotEngine robotEngine = new RobotEngine();

        while (true) {
            System.out.print("> ");
            String input = br.readLine();
            robotEngine.commandBot(createCommand(input));

            if (input.trim().toLowerCase().equals(EXIT_COMMAND)) {
                System.out.println("exiting");
                return;
            }
        }
    }

    static Command createCommand(final String input) {
        String[] split = input.split(COMMAND_DELIMITER);

        Command command;
<commit_msg>rudimentary user input error handling<commit_after>package de.dj_steam.bot.cli;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Optional;

import org.apache.commons.lang3.StringUtils;

import de.dj_steam.bot.domain.Command;
import de.dj_steam.bot.engine.RobotEngine;

/**
 * @author steam
 */

public class LoopingConsole {

    private static final String EXIT_COMMAND = "exit";
    public static final String COMMAND_DELIMITER = " ";

    public static void main(final String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        printUsageBanner();

        RobotEngine robotEngine = new RobotEngine();

        while (true) {
            System.out.print("> ");
            String input = br.readLine();
            try {
                robotEngine.commandBot(createCommand(input));
            }catch (InvalidUserInputException e) {
                System.out.println("\nInput error occurred! Message: " + e.getMessage() +"\n");
                printUsageBanner();
            }

            if (input.trim().toLowerCase().equals(EXIT_COMMAND)) {
                System.out.println("exiting");
                return;
            }
        }
    }

    static Command createCommand(final String input) {
        String[] split = input.split(COMMAND_DELIMITER);

        Command command;

{'fraction_non_alphanumeric': 0.10649750096116878, 'fraction_numerical': 0.0007689350249903883, 'mean_word_length': 2.6239554317548746, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3829636', 'n_tokens_mistral': 733, 'n_tokens_neox': 714, 'n_words': 157}