public void calculateBernoulliProbability() {
		double denominator = mDocuments.size() + 20;
		
		for (int token = 1; token <= voca.size(); token++) {

			double numerator = 1.0;
			// calculate the probability
			for (Document document : mDocuments){
				boolean contain = document.getWordCount().containsKey(Integer.toString(token));
				if (contain) {
					numerator += 1;
				}
			}
			
			bernoulliProbabilities.put(Integer.toString(token), (numerator / denominator));
			
		}
	}