};
}
public static Vector toVector(Interval interval, Corpus<String> corpus) {
Vector vector = new SparseVector();
IntSequence indices = interval.indices();
for (int i = 0; i < indices.size(); i++) {
int start = indices.get(i);
int documentId = corpus.getDocumentId(start);
vector.add(documentId, 1);
}
return vector;
}