Beispiel #1
0
 def run(self):
     while True:
         data= self.input.get()
         contexts = find_children(array([]), data.context, data.index, data.lattice, self.printer)
         contexts = append(contexts, Context(*data.context))
         self.printer.acquire()
         sys.stdout.write("Input length: %d   \r" % self.input.qsize())
         self.printer.release()
         self.output.put(contexts)
Beispiel #2
0
 def make_concepts_only(self):
     top = (frozenset([ind for ind, v in enumerate(self.extent)]), [0 for i in self.intent])
     find_children([], top, 0, self, False)
Beispiel #3
0
 def build_lattice(self, verbose=False):
     top = (frozenset([ind for ind, v in enumerate(self.extent)]), [0 for i in self.intent])
     tops = find_children([], top, 0, self, False, verbose=verbose)
     contexts = self.make_hasse(tops, verbose=verbose)
     return contexts