Resplit the CuratedTrec dataset.
()
| 85 | |
| 86 | |
| 87 | def resplit_ct(): |
| 88 | """Resplit the CuratedTrec dataset.""" |
| 89 | hash_fn = make_hash_fn() |
| 90 | resplit_data( |
| 91 | input_path=FLAGS.ct_train_path, |
| 92 | output_path=get_resplit_path("CuratedTrec", "train"), |
| 93 | keep_fn=lambda x: hash_fn(x) != 0) |
| 94 | resplit_data( |
| 95 | input_path=FLAGS.ct_train_path, |
| 96 | output_path=get_resplit_path("CuratedTrec", "dev"), |
| 97 | keep_fn=lambda x: hash_fn(x) == 0) |
| 98 | resplit_data( |
| 99 | input_path=FLAGS.ct_test_path, |
| 100 | output_path=get_resplit_path("CuratedTrec", "test"), |
| 101 | keep_fn=lambda x: True) |
| 102 | |
| 103 | |
| 104 | def make_hash_fn(): |
no test coverage detected
searching dependent graphs…