public void allocate() throws IOException { if (!allocated) { allocated = true; vocabulary = new HashSet<String>(); for (LanguageModel model : languageModels) { model.allocate(); vocabulary.addAll(model.getVocabulary()); } } }