thbndi commited on
Commit
023a8fe
1 Parent(s): 8dd3b3b

Update Mimic4Dataset.py

Browse files
Files changed (1) hide show
  1. Mimic4Dataset.py +3 -4
Mimic4Dataset.py CHANGED
@@ -544,7 +544,7 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
544
  if not desc.empty:
545
  cond_text.append(desc['description'].to_string(index=False))
546
  template = 'The patient is diagnosed with {}.'
547
- cond_text = template.format('; '.join(cond_text))
548
  else :
549
  cond_text=''
550
 
@@ -562,14 +562,13 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
562
  for mean_val, feat_label in zip(chart_mean, feat_text):
563
  text = template.format(mean_val,feat_label)
564
  chart_text.append(text)
565
- chart_text='The chart events mesured are : ' + '; '.join(chart_text)
566
  else:
567
  chart_text=''
568
 
569
  yield int(key),{
570
  'label' : data['label'],
571
- 'COND': cond_text,
572
- 'CHART/LAB': chart_text,
573
  }
574
 
575
  #############################################################################################################################
 
544
  if not desc.empty:
545
  cond_text.append(desc['description'].to_string(index=False))
546
  template = 'The patient is diagnosed with {}.'
547
+ cond_text = template.format(';'.join(cond_text))
548
  else :
549
  cond_text=''
550
 
 
562
  for mean_val, feat_label in zip(chart_mean, feat_text):
563
  text = template.format(mean_val,feat_label)
564
  chart_text.append(text)
565
+ chart_text='The chart events mesured are :{}.' + ';'.join(chart_text)
566
  else:
567
  chart_text=''
568
 
569
  yield int(key),{
570
  'label' : data['label'],
571
+ 'text': cond_text+chart_text
 
572
  }
573
 
574
  #############################################################################################################################