private void executeArg(String arg, String[] words, HTMLDocument doc) throws IOException, BadLocationException {
        if (arg.equals("-w")){
            page.setCountWords(getCountMap(words, doc));
            return;
        }
        if (arg.equals("-c")){
            page.setCountCharacters(doc.getText(0, doc.getLength()).replaceAll("\\s", "").length());
            return;
        }
        if (arg.equals("-e")){
            page.setSentences(getSentences(words, doc));
            return;
        }
    }