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

Class AndNode

components/expr_parser.py:105–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103 return '( ' + core_form + ' )'
104
105class AndNode(ASTNode):
106 def __init__(self, data_type, fields):
107 super().__init__('AND', 'AND', data_type, fields)
108
109 def textual_form_core(self):
110 # the xxx that
111 if self.fields[0].depth == 0:
112 return ' '.join([self.fields[0].textual_form() ,'that', self.fields[1].textual_form()])
113 # xxx and xxxx
114 else:
115 return ' '.join([self.fields[0].textual_form() ,'and', self.fields[1].textual_form()])
116
117class RNode(ASTNode):
118 def __init__(self, data_type, fields):

Callers 1

buildMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected