MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / get_groups

Method get_groups

docling/utils/layout_postprocessor.py:40–45  ·  view source on GitHub ↗

Returns groups as {root: [elements]}.

(self)

Source from the content-addressed store, hash-verified

38 self.rank[root_x] += 1
39
40 def get_groups(self) -> Dict[int, List[int]]:
41 """Returns groups as {root: [elements]}."""
42 groups = defaultdict(list)
43 for elem in self.parent:
44 groups[self.find(elem)].append(elem)
45 return groups
46
47
48class SpatialClusterIndex:

Callers 1

Calls 1

findMethod · 0.95

Tested by

no test coverage detected