private static void handleArguments(String[] args) {
        CommandLineParser parser = new BasicParser();
        CommandLine commandLine;

        try {
            commandLine = parser.parse(cliOptions, args);
        } catch (ParseException ex) {
            System.out.println("The arguments could not be understood: " + ex.getMessage());
            printCliHelp();
            return;
        }

        if (commandLine.hasOption("g")) {
            System.out.println("The generation grammar is not implemented yet.");
            return;
        }

        if (commandLine.hasOption("w")) {
            String[] optionValues = commandLine.getOptionValues("w");
            Weights.calculateWeights(optionValues[0], optionValues[1], optionValues[2], 1000);
            return;
        }

        if (commandLine.getOptions() != null && commandLine.getOptions().length > 0) {
            System.out.println("The arguments could not be understood.\n");
            printCliHelp();
            return;
        }

        controller.showMainWindow();
    }