def setUp(self): dirname = os.path.dirname(__file__) self.test_docs = txt_file2pb_docs(open(os.path.join(dirname, 'tangshi.txt'))) self.db_path = './test_leveldb' self.dump_path = os.path.join(dirname, 'indexer.bin')
def setUp(self): dirname = os.path.dirname(__file__) self.dump_path = os.path.join(dirname, 'indexer.bin') self.yaml_path = os.path.join(dirname, 'yaml', 'base-indexer.yml') self.n_bytes = 8 self.query_num = 3 self.docs = [] self.querys = [] self.pb_docs = txt_file2pb_docs( open(os.path.join(dirname, 'tangshi.txt')))
def setUp(self): dirname = os.path.dirname(__file__) self.test_docs = txt_file2pb_docs( open(os.path.join(dirname, 'tangshi.txt'))) self.query_hit_id = list(range(len(self.test_docs))) self.query_miss_id = list( range(len(self.test_docs) + 1, len(self.test_docs) + 100)) self.db_path = './test_leveldb' self.dump_path = os.path.join(dirname, 'indexer.bin')