public double checkAccuracy(int method, DataSet trainSet, DataSet testSet)
	{
		int correctCount = 0;
		int wrongCount = 0;
		String predictedCorrect = "";
		
		for(int i=0; i < testSet.correctWords.size(); i++)
		{
			String actualCorrect = testSet.correctWords.get(i);
			String wrong = testSet.wrongWords.get(i);
			
			if(method == Framework.EDIT_DISTANCE)
				predictedCorrect = spellCheckEditDistance(wrong);
				
			else if(method == Framework.CONFUSION_MATRIX)
			{
				int errorType = errorMatrices.findError(wrong, actualCorrect)[0];
				if(errorType == ErrorMatrices.UNKNOWN_ERROR)	// Not a single error, ignore
					continue;
					
				predictedCorrect = spellCheckConfusionMatrices(wrong, testSet);
			}
			
			if(predictedCorrect.equals(actualCorrect))
				correctCount++;
			else
			{
				System.out.println("\nPrediction went wrong:\nWrong word: " + wrong + "\nPredicted correct: " + predictedCorrect + "\nActual correct: " + actualCorrect);
				wrongCount++;
			}
		}
		
		double accuracy = (double) (correctCount * 100) / (correctCount + wrongCount);
		return accuracy;
	}