doc.add(countField);
writer.addDocument(doc);
}
private void testIndex(File languageModelIndex) throws IOException {
LanguageModel languageModel = new LuceneLanguageModel(languageModelIndex);
ConfusionProbabilityRule rule = new ConfusionProbabilityRule(TestTools.getEnglishMessages(), languageModel, new FakeLanguage()) {
@Override public String getDescription() { return null; }
@Override public String getMessage(String suggestion) { return null; }
};
ConfusionProbabilityRule.ConfusionSet confusionSet = new ConfusionProbabilityRule.ConfusionSet("a", "an");