MCPcopy Create free account
hub / github.com/google-research/language / construct_query2box

Method construct_query2box

language/emql/data_loader.py:553–565  ·  view source on GitHub ↗

Load query2box data into a list of examples.

(self, name)

Source from the content-addressed store, hash-verified

551 return all_entity_is_cvt
552
553 def construct_query2box(self, name):
554 """Load query2box data into a list of examples."""
555 task = name.split('_')[-1]
556 # we don't train our model in the same way as query2box,
557 # so we won't load their training data.
558 test_data = pickle.load(
559 gfile.GFile(self.root_dir + 'test_ans_%s.pkl' % task, 'rb'))
560
561 converted_test_data = list()
562 for query, unused_answers in test_data.items():
563 converted_test_data.append(query)
564
565 return None, converted_test_data
566
567 ##############################################################
568 ###################### Build tf.dataset ######################

Callers 1

construct_datasetMethod · 0.95

Calls 2

splitMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected