public static int[] letterFrequency(String word) { // This function is very nearly identical to the letterFrequency function from Week 9 Problem 9. I altered it so that it finds the frequency of a single word, instead of an entire file.
		final String ALPHABET = "abcdefghijklmnopqrstuvwxyz"; // Create a constant String instance to represent the alphabet
		
		int[] frequencyList = new int[26]; // The indices of the entries in the list of frequencies correspond to the letters as in the NUMBER_TO_LETTER dictionary

		for (int i = 0; i < 26; i ++) { // Loop 26 times
			frequencyList[i] = 0; // Initialize the frequency of the letter to 0
		}

		for (int j = 0; j < word.length(); j ++) { // Loop through the word
				String currentChar = word.substring(j, j + 1).toLowerCase(); // Get the current character and convert it to lowercase

				if (ALPHABET.indexOf(currentChar) != -1) { // If the current character is in the alphabet:
					frequencyList[LETTER_TO_NUMBER.get(currentChar)] ++; // Increment the frequency of the current character
				}
			}

		return frequencyList; // Return the list of frequencies
	}