private double calculateP1(Word w, Word p, Tag wt, NumMap np, int state) {
		double p1 = 0.0;
		if (np != null) {
			p1 = np.sum() * 1.0 / wt.freq();
		} else {
			if (p == null) {
				p1 = (wt.emiss_set_size / (wt.emiss_set_size + 1.0))
						* (1 / wt.freq());
			} else {
				Tag temp = null;
				Long freqT = null;
				for (Entry<Integer, NumMap> entry : p.tags.entrySet()) {
					temp = tagMap.get(entry.getKey());
					if (temp == null)
						continue;
					freqT = temp.trans.getVal(state);
					if (freqT == null)
						continue;
					p1 += (entry.getValue().sum() * 1.0 * freqT / temp.trans
							.sum());
				}
				p1 /= p.freq();
				p1 /= wt.freq();
			}
		}
		return p1;
	}