if (n < 0) {
n = scores.size();
}
ScoredItemAccumulator accum = new TopNScoredItemAccumulator(n);
for (VectorEntry pred : scores) {
final double v = pred.getValue();
accum.put(pred.getKey(), v);
}
List<ScoredId> results = accum.finish();
if (!scores.getChannelSymbols().isEmpty()) {
ScoredIdListBuilder builder = ScoredIds.newListBuilder(results.size());
List<Pair<Symbol,SparseVector>> cvs = Lists.newArrayList();
List<Pair<TypedSymbol<?>, Long2ObjectMap<?>>> channels = Lists.newArrayList();
for (Symbol sym: scores.getChannelVectorSymbols()) {