knownCentroids = mapBuilder.build();
}
@Override
public List<Pair<String, Double>> analyze(Document unknown) throws AnalyzeException {
Histogram unknownHistogram = new AbsoluteHistogram(unknown);
List<Pair<String, Double>> result = new ArrayList<Pair<String, Double>>(knownCentroids.size());
for (Entry<String, Histogram> knownEntry : knownCentroids.entrySet()) {
try {
double current = distance.distance(unknownHistogram, knownEntry.getValue());
logger.debug(unknown.getTitle()+" ("+unknown.getFilePath()+")"+" -> "+knownEntry.getKey()+":"+current);