code: def read_dataset(args, dataset):
      
      path = os.path.join(vars(args)[dataset])
      logger.info('reading data from {}'.format(path))
      examples = [line.strip().split('\t') for line in open(path)]
      if args.max_num_examples > 0:
          examples = examples[:args.max_num_examples]
      # NOTE: assume data has been tokenized
      dataset = gluon.data.SimpleDataset([(e[0], e[1], LABEL_TO_IDX[e[2]]) for e in examples])
      dataset = dataset.transform(lambda s1, s2, label: (
          ['NULL'] + s1.lower().split(),
          ['NULL'] + s2.lower().split(), label),
                                  lazy=False)
      logger.info('read {} examples'.format(len(dataset)))
      return dataset
docs: Read dataset from tokenized files.