acul3 commited on
Commit
8fb2a3d
1 Parent(s): ae64f08

Update Polylingual_Id.py

Browse files
Files changed (1) hide show
  1. Polylingual_Id.py +3 -0
Polylingual_Id.py CHANGED
@@ -124,6 +124,9 @@ class Polylingual_Id(datasets.GeneratorBasedBuilder):
124
  if example.get('url') is not None:
125
  yield id_, {'text':example['text'],'url':example['url']}
126
  id_ += 1
 
 
 
127
  else:
128
  yield id_, {'text':example['text'],'url':None}
129
  id_ += 1
 
124
  if example.get('url') is not None:
125
  yield id_, {'text':example['text'],'url':example['url']}
126
  id_ += 1
127
+ elif example.get('metadata') is not None:
128
+ yield id_, {'text':example['text'],'url':example['metadata']['url']}
129
+ id_ += 1
130
  else:
131
  yield id_, {'text':example['text'],'url':None}
132
  id_ += 1