public static void tagger(String devDataFile, String countFile,
			String trainDataFile) throws IOException {

		HashMap<String, TreeMap<Double, String>> emissionParams = eParamsCalculator(countFile);
		HashMap<String, Integer> wordToCount = rareCounter("ner_0.counts",
				trainDataFile);

		FileReader in = new FileReader(devDataFile);
		BufferedReader br = new BufferedReader(in);

		File rareCounts = new File("dev_results.dat");
		BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(
				rareCounts));

		String input;
		double logP;
		String maxTag;

		while ((input = br.readLine()) != null) {
			if (input.length() > 0) {
				if (wordToCount.containsKey(input)) {
					if (wordToCount.get(input).intValue() < 5) {
						logP = Math.log(emissionParams.get("_RARE_").lastKey()
								.doubleValue())
								/ Math.log(2);
						maxTag = emissionParams.get("_RARE_").lastEntry()
								.getValue();
					} else {
						logP = Math.log(emissionParams.get(input).lastKey()
								.doubleValue())
								/ Math.log(2);
						maxTag = emissionParams.get(input).lastEntry()
								.getValue();
					}
				} else {
					logP = Math.log(emissionParams.get("_RARE_").lastKey()
							.doubleValue())
							/ Math.log(2);
					maxTag = emissionParams.get("_RARE_").lastEntry()
							.getValue();
				}
				bufferedWriter.write(input + " " + maxTag + " " + logP + "\n");
			}
			else {
				bufferedWriter.write("\n");
			}
		}
		bufferedWriter.close();

	}