public static void analyseResults(File resultFile)
	{
		try
		{
			int correctHams = 0;
			int correctSpams = 0;
			int incorrectHams = 0;
			int incorrectSpams = 0;
			int lineCounter = 0;
			
			Scanner sc = new Scanner(resultFile);
			
			File analysisFile = new File("analysis3.txt");
			
			BufferedWriter bw = new BufferedWriter(new FileWriter(analysisFile));
			
			while (sc.hasNextLine())
			{
				String tempLine = sc.nextLine();
				String[] splitLine = tempLine.split("   ");
				
				lineCounter = Integer.parseInt(splitLine[0]);
				
				if (lineCounter < 401)
				{
					bw.write(lineCounter + "   " + splitLine[1] + "   " + splitLine[2] + "   spam   ");	
					
					if (splitLine[2].compareTo("spam") == 0)
					{
						bw.write("correct");
						correctSpams++;
					}
					else
					{
						bw.write("incorrect");
						incorrectSpams++;
					}
				}
				else
				{
					bw.write(lineCounter + "   " + splitLine[1] + "   " + splitLine[2] + "   ham   ");	
					
					if (splitLine[2].compareTo("ham") == 0)
					{
						bw.write("correct");
						correctHams++;
					}
					else
					{
						bw.write("incorrect");
						incorrectHams++;
					}
				}
				
				bw.newLine();
				
			}
			
			bw.write("Correct Hams = " + correctHams + " IncorrectHams = " + incorrectHams + " Correct Spams =  " + correctSpams + " IncorrectSpams = " + incorrectSpams);
			bw.newLine();
			
			int totalCorrect = correctHams + correctSpams;
			
			bw.write(String.valueOf(totalCorrect));
			
			bw.close();
			
		}
		catch (FileNotFoundException f)
		{
			System.out.println(f.getMessage());
		}
		catch (IOException e)
		{
			System.out.println(e.getMessage());
		}
		
	}