MCPcopy Create free account
hub / github.com/LHRLAB/ChatKBQA / logical_form

Method logical_form

components/expr_parser.py:63–68  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

61 return SchemaNode(tok, data_type, fields)
62
63 def logical_form(self):
64 if self.depth == 0:
65 return self.val
66 else:
67 fields_str = [x.logical_form() for x in self.fields]
68 return ' '.join(['(', self.val] + fields_str + [')'])
69
70 # nothing special. just fit legacy code input syle
71 def compact_logical_form(self):

Callers 4

compact_logical_formMethod · 0.95
__str__Method · 0.95
__repr__Method · 0.95
parse_s_exprFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected