<commit_before>package com.github.mnicky.bible4j.cli;

import java.util.Arrays;

import com.github.mnicky.bible4j.storage.BibleStorage;
import com.github.mnicky.bible4j.storage.BibleStorageException;

public class MainCommandParser {
    
    private final BibleStorage storage;
    
    private final String BIBLE_READ_COMMAND = "read";
    private final String BIBLE_SEARCH_COMMAND = "search";
    private final String IMPORT_COMMAND = "import";
    private final String EXPORT_COMMAND = "export";
    private final String NOTES_COMMAND = "note";
    private final String DICTIONARY_COMMAND = "dict";
    private final String DAILY_READINGS_COMMAND = "daily";
    private final String BOOKMARKS_COMMAND = "bkmark";
    private final String HELP_COMMAND = "help";
    
    public MainCommandParser(BibleStorage bibleStorage) {
	this.storage = bibleStorage;
    }
    
    public void parse(String[] args) throws BibleStorageException {
	
	CommandParser parser = getCommandParser(args);
	
	if (parser != null)
	    parser.run(Arrays.copyOfRange(args, 1, args.length));
	else
	    printHelp();
    }



    private CommandParser getCommandParser(String[] args) {<commit_msg>run() call renamed to parse()<commit_after>package com.github.mnicky.bible4j.cli;

import java.util.Arrays;

import com.github.mnicky.bible4j.storage.BibleStorage;
import com.github.mnicky.bible4j.storage.BibleStorageException;

public class MainCommandParser {
    
    private final BibleStorage storage;
    
    private final String BIBLE_READ_COMMAND = "read";
    private final String BIBLE_SEARCH_COMMAND = "search";
    private final String IMPORT_COMMAND = "import";
    private final String EXPORT_COMMAND = "export";
    private final String NOTES_COMMAND = "note";
    private final String DICTIONARY_COMMAND = "dict";
    private final String DAILY_READINGS_COMMAND = "daily";
    private final String BOOKMARKS_COMMAND = "bkmark";
    private final String HELP_COMMAND = "help";
    
    public MainCommandParser(BibleStorage bibleStorage) {
	this.storage = bibleStorage;
    }
    
    public void parse(String[] args) throws BibleStorageException {
	
	CommandParser parser = getCommandParser(args);
	
	if (parser != null)
	    parser.parse(Arrays.copyOfRange(args, 1, args.length));
	else
	    printHelp();
    }



    private CommandParser getCommandParser(String[] args) {
{'fraction_non_alphanumeric': 0.08629441624365482, 'fraction_numerical': 0.00338409475465313, 'mean_word_length': 4.152505446623094, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2497075', 'n_tokens_mistral': 707, 'n_tokens_neox': 698, 'n_words': 176}