wekaInstance.setValue(instanceId.index(), entry.getKey()
.doubleValue());
// set document class
Attribute classAttr = instances.attribute(CLASS);
wekaInstance.setValue(classAttr.index(),
classAttr.indexOfValue(entry.getValue()));
// set numeric words
if (bagOfWordsData.getInstanceNumericWords()
.get(entry.getKey()) != null) {
for (Map.Entry<String, Double> word : bagOfWordsData
.getInstanceNumericWords().get(entry.getKey())