(fold)
| 66 | |
| 67 | # data loading functions |
| 68 | def atisfold(fold): |
| 69 | assert fold in range(5) |
| 70 | filename = os.path.join(PREFIX, 'atis.fold'+str(fold)+'.pkl.gz') |
| 71 | f = gzip.open(filename, 'rb') |
| 72 | try: |
| 73 | train_set, valid_set, test_set, dicts = pickle.load(f, encoding='latin1') |
| 74 | except: |
| 75 | train_set, valid_set, test_set, dicts = pickle.load(f) |
| 76 | return train_set, valid_set, test_set, dicts |
| 77 | |
| 78 | |
| 79 | # metrics function using conlleval.pl |