private void processDocument() {
		
		//Iterates through every line in the document using the provided DocumentReader class.
		while (document.hasLines()) {
			
			//Increases the line count.
			lines++;
			
			//Splits each word in the document into a string index.
			String[] parseString = document.getLine().split("\\s");
			
			//Iterates through all of the strings of words in this line
			//and removes any non-number\letter character.
			for (int count = 0; count < parseString.length; count++) {
				parseString[count] = stripPunctuation(parseString[count]
						.toLowerCase());
			}
			
			//Iterates through every word in the line.
			for (int count = 0; count < parseString.length; count++) {
				
				//Ignores specific cases where a string containing only non-alphanumeric 
				//characters would be incorrectly considered a word.
				if (!parseString[count].equals("")) {
					
					//Checks to see if the word has already been seen, if so increases it's count.
					if (seenWord(parseString[count])) {
						words[findWord(parseString[count])]
								.incrementFrequency();
					} 
					
					//Otherwise adds it to the words array and increases the unique words count.
					else {
						addWord(parseString[count]);
						uniqueWords++;
					}
				}
			}
		}
	}