private double distance_with_tag(Cell pre, String preTag, Cell next,
			String nextTag) {
		int codep = ergate.core.Tag.TagMapper.tag2I(preTag);
		int coden = ergate.core.Tag.TagMapper.tag2I(nextTag);
		Word w = getWord(next);
		Tag wt = tagMap.get(codep);
		Word p = getWord(pre);
		NumMap np = null;
		Long val = null;
		double lamda = 1.0;
		if (w != null) {
			np = w.tags.get(codep);
			if (np != null) {
				val = np.getVal(coden);
				if (val != null)
					lamda = Math.exp(-val);
			}
		}
		double p2 = calculateP2(w, p, wt, np, val, codep, coden);
		if (p2 > 0.0 && lamda == 1.0) {
			lamda = 0.6;
		}
		double p1 = calculateP1(w, p, wt, np, codep);
		return NumUtils.H((1 - lamda) * p2 + lamda * p1);
	}