if ((!config.getBoolean(Configuration.SPELL_IGNORESENTENCECAPITALIZATION)) && (tokenizer.isNewSentence()) && (Character.isLowerCase(word.charAt(0)))) {
if (isSupposedToBeCapitalized(word, tokenizer)) {
  public final int checkSpelling(WordTokenizer tokenizer) {    int errors = 0;    boolean terminated = false;    //Keep track of the previous word//    String previousWord = null;    while (tokenizer.hasMoreWords() && !terminated) {      String word = tokenizer.nextWord();      //Check the spelling of the word      if (!isCorrect(word)) { 		if ((config.getBoolean(Configuration.SPELL_IGNOREMIXEDCASE) && isMixedCaseWord(word, tokenizer.isNewSentence())) ||            (config.getBoolean(Configuration.SPELL_IGNOREUPPERCASE) && isUpperCaseWord(word)) ||            (config.getBoolean(Configuration.SPELL_IGNOREDIGITWORDS) && isDigitWord(word)) ||            (config.getBoolean(Configuration.SPELL_IGNOREINTERNETADDRESSES) && isINETWord(word))) {          //Null event. Since we are ignoring this word due          //to one of the above cases.        } else {          //We cant ignore this misspelt word          //For this invalid word are we ignoring the misspelling?          if (!ignoredWords.contains(word)) {            errors++;            //Is this word being automagically replaced            if (autoReplaceWords.containsKey(word)) {              tokenizer.replaceWord((String) autoReplaceWords.get(word));            } else {              //JMH Need to somehow capitalise the suggestions if              //ignoreSentenceCapitalisation is not set to true              //Fire the event.              SpellCheckEvent event = new BasicSpellCheckEvent(word, getSuggestions(word, config.getInteger(Configuration.SPELL_THRESHOLD)), tokenizer);              terminated = fireAndHandleEvent(tokenizer, event);            }          }        }      } else {        //This is a correctly spelt word. However perform some extra checks        /*         *  JMH TBD          //Check for multiple words         *  if (!ignoreMultipleWords &&) {         *  }         */        //Check for capitalisation        if ((!config.getBoolean(Configuration.SPELL_IGNORESENTENCECAPITALIZATION)) && (tokenizer.isNewSentence()) && (Character.isLowerCase(word.charAt(0)))) {          errors++;          StringBuffer buf = new StringBuffer(word);          buf.setCharAt(0, Character.toUpperCase(word.charAt(0)));          Vector suggestion = new Vector();          suggestion.addElement(new Word(buf.toString(), 0));          SpellCheckEvent event = new BasicSpellCheckEvent(word, suggestion, tokenizer);          terminated = fireAndHandleEvent(tokenizer, event);        }      }    }    if (terminated)      return SPELLCHECK_CANCEL;    else if (errors == 0)      return SPELLCHECK_OK;    else      return errors;  }