MCPcopy Create free account
hub / github.com/chatdoc-com/OCRFlux / bracket

Method bracket

eval/eval_table_to_html_olmocr.py:22–31  ·  view source on GitHub ↗

Show tree using brackets notation

(self)

Source from the content-addressed store, hash-verified

20 self.children = list(children)
21
22 def bracket(self):
23 """Show tree using brackets notation"""
24 if self.tag == 'td':
25 result = '"tag": %s, "colspan": %d, "rowspan": %d, "text": %s' % \
26 (self.tag, self.colspan, self.rowspan, self.content)
27 else:
28 result = '"tag": %s' % self.tag
29 for child in self.children:
30 result += child.bracket()
31 return "{{{}}}".format(result)
32
33
34class CustomConfig(Config):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected