def construct_dataset(self, name, train_split):
    """Construct datasets for training and testing.

    Args:
      name: name of the learning task
      train_split: percentage of data for training
    """
    if name in ['membership', 'mixture']:
      self.train_data_membership, self.test_data_membership = \
          self.construct_membership(train_split)
    if name in ['intersection', 'union', 'mixture']:
      self.train_data_set_pair, self.test_data_set_pair = \
          self.construct_set_pairs(train_split)
    if name == 'follow':
      self.train_data_follow, self.test_data_follow = \
          self.construct_follow_facts(train_split)
    if name in ['set_follow', 'mixture']:
      self.train_data_follow, self.test_data_follow = \
          self.construct_set_follow_facts(train_split)
    if name in ['metaqa2', 'metaqa3']:
      self.train_data_metaqa, self.test_data_metaqa = \
          self.construct_metaqa_data(
              train_file='train.json', test_file='test.json')
    if name in ['webqsp']:
      self.bert_tokenizer = util.BertTokenizer()
      self.train_data_webqsp, self.test_data_webqsp = self.construct_webqsp(
          train_file='train.json', test_file='test.json')
      self.all_entity_is_cvt = self.check_cvt_entity()
    if name.startswith('query2box'):
      self.q2b_id2entity = pickle.load(
          gfile.GFile(self.root_dir + 'ind2ent.pkl', 'rb'))
      self.q2b_id2relation = pickle.load(
          gfile.GFile(self.root_dir + 'ind2rel.pkl', 'rb'))
      self.train_data_query2box, self.test_data_query2box = \
          self.construct_query2box(name)
Construct datasets for training and testing.

    Args:
      name: name of the learning task
      train_split: percentage of data for training
    
language/emql/data_loader.py