@@ -182,28 +182,6 @@ def write_file(self, json_ntuple, msg):
182182 f = open (generated , "w" )
183183 f .write (json_ntuple )
184184
185- def prompt (self ):
186- while True :# and not self.clarification:
187- #print(self.clarification)
188- if self .clarification :
189- pass
190- else :
191- specialize = True
192- msg = input ("> " )
193-
194- if msg == "q" :
195- self .transport .quit_federation ()
196- quit ()
197- elif msg == None or msg == "" :
198- specialize = False
199- elif msg .lower () == 'd' :
200- self .specializer .set_debug ()
201- specialize = False
202- elif specialize :
203- #if self.check_spelling(msg):
204- ntuple = self .process_input (msg )
205- if ntuple and ntuple != None and "predicate_type" in ntuple :
206- self .transport .send (self .solve_destination , ntuple )
207185
208186
209187
@@ -212,32 +190,6 @@ def process_clarification(self, tag, msg, ntuple):
212190 #self.output_stream(tag, msg)
213191 new_ntuple = {'tag' : tag , 'message' : msg , 'type' : "clarification" , 'original' : ntuple }
214192 self .transport .send (self .text_address , new_ntuple )
215- """
216- #print(ntuple)
217- while True:
218- msg = input(" > ")
219- #if msg == "q":
220- # self.clarification = False
221- # self.transport.quit_federation()
222- if msg == "q":
223- self.clarification = False
224- break
225- elif msg:
226- try:
227- first = self.process_input(msg)
228- descriptor = json.loads(first)
229- #print(descriptor)
230- converted = self.decoder.convert_JSON_to_ntuple(ntuple)
231- self.clarification = False
232- new_ntuple = self.clarify_ntuple(converted, descriptor)
233- json_ntuple = self.decoder.convert_to_JSON(new_ntuple)
234- #json_ntuple = json.dumps(new_ntuple)
235- self.transport.send(self.solve_destination, json_ntuple)
236- self.clarification = False
237- break
238- except Exception as e:
239- print(e)
240- """
241193
242194
243195 def clarify_ntuple (self , ntuple , descriptor ):
0 commit comments