public void P6(String testfile) throws FileNotFoundException {
		LinkedList<Double> list = new LinkedList<Double>();
		File file = new File(testfile);
		Scanner scanner = new Scanner(new BufferedReader(new FileReader(file)));

		while (scanner.hasNextLine()) {
			double sum = 0;
			String line = "#START# " + scanner.nextLine().trim() + " #END#";
			String[] temp = line.split(" ");

			for (int i = 0; i <= temp.length - 2; i++) {
				String string = temp[i] + " " + temp[i + 1];
				if (bigrammodel_new.containsKey(string)) {
					sum += Math.log(bigrammodel_new.get(string));
				} else {
					double numerator = 0;
					double denominator = 0;
					if (this.unigrammodel_new.containsKey(temp[i + 1])) {
						numerator = this.unigrammodel_new.get(temp[i + 1]);
					} else {
						numerator = this.unigrammodel_new.get("#UNBEKANNT#");
					}
					if (this.unigramCnt.containsKey(temp[i])) {
						denominator = this.unigramCnt.get(temp[i]);
					} else {
						denominator = 0;
					}
					sum += Math.log(numerator * this.beta
							/ (this.beta + denominator));
				}
			}
			list.add(sum);
		}
		scanner.close();

		int errcnt = 0;
		for (int i = 0; i <= list.size() - 3; i = i + 2) {
			if (list.get(i) <= list.get(i + 1)) {
				errcnt++;
			}
		}
		System.out.println("Accuracy: " + (1 - ((errcnt + 0.0) / list.size())));
		System.out.println("beta " + this.beta);
	}