private void getUnigramModel(String trainfile) throws FileNotFoundException {
		File file = new File(trainfile);
		Scanner scanner = new Scanner(new BufferedReader(new FileReader(file)));

		int sum = 0;

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

			for (String string : temp) {
				Integer count = unigramCnt.get(string);
				unigramCnt.put(string, (count == null) ? 1 : count + 1);
			}
		}
		unigramCnt.put("#UNBEKANNT#", 0);// put in the unknown word
		this.typetotal = unigramCnt.size();// plus unknown
		this.tokentotal = sum;// total number of tokens in the
								// corpusFileNotFoundException

		for (Map.Entry<String, Integer> entry : unigramCnt.entrySet()) {
			String unigram = entry.getKey();
			Integer count = entry.getValue();

			this.unigrammodel.put(unigram, (count + 1.0)
					/ (this.tokentotal + this.typetotal));

		}
		scanner.close();
	}