Exemple #1
0
    def update_config(self):

        self.config = PRACMLNConfig()
        self.config["use_emln"] = self.use_emln.get()
        self.config['mln'] = self.mln_container.selected_file.get().strip(
        ).lstrip('*')
        self.config['emln'] = self.emln_container.selected_file.get().strip(
        ).lstrip('*')
        self.config["db"] = self.db_container.selected_file.get().strip(
        ).lstrip('*')
        self.config["method"] = InferenceMethods.id(
            self.selected_method.get().strip())
        self.config["params"] = self.params.get().strip()
        self.config["queries"] = self.query.get()
        self.config["output_filename"] = self.output_filename.get().strip()
        self.config["cw"] = self.closed_world.get()
        self.config["cw_preds"] = self.cwPreds.get()
        self.config['profile'] = self.profile.get()
        self.config['logic'] = self.selected_logic.get()
        self.config['grammar'] = self.selected_grammar.get()
        self.config['multicore'] = self.multicore.get()
        self.config['save'] = self.save.get()
        self.config['ignore_unknown_preds'] = self.ignore_unknown_preds.get()
        self.config['verbose'] = self.verbose.get()
        self.config['window_loc'] = self.master.winfo_geometry()
        self.config['dir'] = self.dir
        self.project.queryconf = PRACMLNConfig()
        self.project.queryconf.update(self.config.config.copy())
Exemple #2
0
 def set_outputfilename(self):
     if not hasattr(self, "output_filename") or not hasattr(
             self, "db_filename") or not hasattr(self, "mln_filename"):
         return
     mln = self.mln_container.selected_file.get()
     db = self.db_container.selected_file.get()
     if "" in (mln, db):
         return
     if self.selected_method.get():
         method = InferenceMethods.clazz(self.selected_method.get())
         methodid = InferenceMethods.id(method)
         filename = config.query_output_filename(mln, methodid, db)
         self.output_filename.set(filename)