### Question:
PhraseProbabilityCalculator { public double getProbability(String phrase) { String[] tokens = phrase.split("\\s"); String stem = stem(tokens[0].toLowerCase()); double probability = matrix.getProbability(stem, true); double phraseProbability = Math.log10(probability); for (int i = 0; i <= tokens.length - 2; i++) { String first = stem(tokens[i].toLowerCase()); String second = stem(tokens[i + 1].toLowerCase()); double bigramProbability = matrix.getConditionalProbability(second, first, true); phraseProbability += Math.log10(bigramProbability); } return phraseProbability; } PhraseProbabilityCalculator(File matrixFile, Language language);  PhraseProbabilityCalculator(CooccurrenceMatrix matrix, Language language); double getProbability(String phrase); static void convert(); static void main(String[] args);  }### Answer:
@Test public void testPhraseProbabilities() { CooccurrenceMatrix matrix = CooccurrenceMatrixTest.createTestMatrix(); PhraseProbabilityCalculator calculator = new PhraseProbabilityCalculator(matrix, null); double probability = calculator.getProbability("I want chinese food"); assertEquals(-3.44, probability, 0.001); }