src/traffickarmasent/tests/spellchecker-master/spellcheck.java
//This method checks every vowel combination in the given input word and stops once a match is found. 
This method checks every vowel combination in the given input word and stops once a match is found.
This method checks every vowel combination in the given input word and stops once a match is found .
public static void vowelSearch(String word, int count) {
        String vowels = "eaoiu"; 
        if (dict.search(word)) {
            printOnce(word);
            return;
        }
        if (count >= word.length())
            return;
        int vowelLocation = vowels.indexOf(word.charAt(count));
        if (vowelLocation >= 0) {
            for (int i = 0; i < vowels.length(); i++) {
                if (count == word.length() - 1)
                    word = word.substring(0, word.length() - 1) + vowels.charAt(i);
                else
                    word = word.substring(0, count) + vowels.charAt(i) + word.substring(count + 1, word.length());
                vowelSearch(word, count + 1);
                if(printOne)
                    return;
            }
        }
        else
            vowelSearch(word, count + 1);
    }
public static void vowelSearch ( String word , int count ) { String vowels = "eaoiu" ; if ( dict . search ( word ) ) { printOnce ( word ) ; return ; } if ( count >= word . length ( ) ) return ; int vowelLocation = vowels . indexOf ( word . charAt ( count ) ) ; if ( vowelLocation >= 0 ) { for ( int i = 0 ; i < vowels . length ( ) ; i ++ ) { if ( count == word . length ( ) - 1 ) word = word . substring ( 0 , word . length ( ) - 1 ) + vowels . charAt ( i ) ; else word = word . substring ( 0 , count ) + vowels . charAt ( i ) + word . substring ( count + 1 , word . length ( ) ) ; vowelSearch ( word , count + 1 ) ; if ( printOne ) return ; } } else vowelSearch ( word , count + 1 ) ; }
This method checks every vowel combination in the given input word and stops once a match is found.
This method checks every vowel combination in the given input word and stops once a match is found .
//This order was chosen based on the frequency of occurrence of vowels in the english language // replace that vowel with vowels(i), then call the funciton // once again with the new word and an incremented count