rbawden commited on
Commit
7e539c7
1 Parent(s): b671eb0

Update DiaBLa.py

Browse files
Files changed (1) hide show
  1. DiaBLa.py +4 -1
DiaBLa.py CHANGED
@@ -101,12 +101,15 @@ class Diabla(datasets.GeneratorBasedBuilder):
101
  dialogue_info_keys = ['start_time', 'end_time', 'scenario',
102
  'user1', 'user2', 'translation_model',
103
  'final_evaluation_user1', 'final_evaluation_user2']
 
 
 
104
  dialogue_info = {k: dialogue[k] for k in dialogue_info_keys}
105
  # Main data: the utterances
106
  for utterance_id in dialogue['utterances']:
107
  utterance = dialogue['utterances'][utterance_id]
108
  # Meta-information attached to the utterance
109
- utterance_info_keys = ['judgment', 'verbatim', 'problems', 'user']
110
  utterance_info = {'eval-' + k: utterance['eval'][k] for k in utterance_info_keys}
111
  utterance_info['language'] = utterance['language']
112
  # Utterance text
 
101
  dialogue_info_keys = ['start_time', 'end_time', 'scenario',
102
  'user1', 'user2', 'translation_model',
103
  'final_evaluation_user1', 'final_evaluation_user2']
104
+ for info_to_remove in ['eval-stage', 'useragent']:
105
+ del dialogue['user1'][info_to_remove]
106
+ del dialogue['user2'][info_to_remove]
107
  dialogue_info = {k: dialogue[k] for k in dialogue_info_keys}
108
  # Main data: the utterances
109
  for utterance_id in dialogue['utterances']:
110
  utterance = dialogue['utterances'][utterance_id]
111
  # Meta-information attached to the utterance
112
+ utterance_info_keys = ['judgment', 'verbatim', 'problems']
113
  utterance_info = {'eval-' + k: utterance['eval'][k] for k in utterance_info_keys}
114
  utterance_info['language'] = utterance['language']
115
  # Utterance text