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

Class RNode

components/expr_parser.py:117–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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):
119 super().__init__('R', 'R', data_type, fields)
120
121 def textual_form(self):
122 # only surface relation is reserved
123 assert self.depth == 1
124 return self.textual_form_core()
125
126 def textual_form_core(self):
127 return self.fields[0].textual_form() + ' by'
128
129class CountNode(ASTNode):
130 def __init__(self, data_type, fields):

Callers 1

buildMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected