(self)
return str(tb)
return full version of query history
return full version of query history
return full version of query history
def full_history(self):
        """return full version of query history"""
        oracle_name_list = list(self._oracle_dict.keys())
        oracles_num = len(oracle_name_list)
        oracle_labeling_count = [0] * oracles_num

        tb = pt.PrettyTable()
        # tb.set_style(pt.MSWORD_FRIENDLY)

        tb.add_column('oracles', oracle_name_list)
        for query_ind in range(len(self.query_history)):
            query_result = self.query_history[query_ind]

            name_inds = enumerate(query_result[0])
            name_dict = dict()
            for i, name in name_inds:
                oracle_labeling_count[oracle_name_list.index(name)] += 1
                name_dict[name] = i

            tb.add_column(str(query_ind),
                          ['\\' if name not in name_dict.keys() else "query_index:%s\nresponse:%s\ncost:%s" % (
                              str(query_result[2]), str(query_result[1][name_dict[name]][0]),
                              str(query_result[1][name_dict[name]][1])) for name in oracle_name_list])

        tb.add_column('in all', oracle_labeling_count)
        return str(tb)
def full_history ( self ) : oracle_name_list = list ( self . _oracle_dict . keys ( ) ) oracles_num = len ( oracle_name_list ) oracle_labeling_count = [ 0 ] * oracles_num tb = pt . PrettyTable ( ) # tb.set_style(pt.MSWORD_FRIENDLY) tb . add_column ( 'oracles' , oracle_name_list ) for query_ind in range ( len ( self . query_history ) ) : query_result = self . query_history [ query_ind ] name_inds = enumerate ( query_result [ 0 ] ) name_dict = dict ( ) for i , name in name_inds : oracle_labeling_count [ oracle_name_list . index ( name ) ] += 1 name_dict [ name ] = i tb . add_column ( str ( query_ind ) , [ '\\' if name not in name_dict . keys ( ) else "query_index:%s\nresponse:%s\ncost:%s" % ( str ( query_result [ 2 ] ) , str ( query_result [ 1 ] [ name_dict [ name ] ] [ 0 ] ) , str ( query_result [ 1 ] [ name_dict [ name ] ] [ 1 ] ) ) for name in oracle_name_list ] ) tb . add_column ( 'in all' , oracle_labeling_count ) return str ( tb )