}
List<ChunkedExtraction> sorted = asSortedList(extractions);
HashMap<Integer, List<ChunkedExtraction>> results = new HashMap<Integer, List<ChunkedExtraction>>();
int groupNum = 0;
ChunkedExtraction current = sorted.get(0);
results.put(0, new ArrayList<ChunkedExtraction>());
results.get(0).add(current);
for (int i = 1; i < sorted.size(); i++) {
ChunkedExtraction e = sorted.get(i);
if (!e.isAdjacentOrOverlaps(current)) {
groupNum++;
results.put(groupNum, new ArrayList<ChunkedExtraction>());
}
results.get(groupNum).add(e);
current = e;