Skip to content

Instantly share code, notes, and snippets.

@mlai-demo
Last active April 18, 2020 16:51
Show Gist options
  • Save mlai-demo/0abf554a4dc0daba2023dce151301016 to your computer and use it in GitHub Desktop.
Save mlai-demo/0abf554a4dc0daba2023dce151301016 to your computer and use it in GitHub Desktop.
docs = []
for file in tqdm(file_list):
j = json.load(open(file, "rb"))
abstract = ""
try:
if j['abstract']:
for entry in j['abstract']:
abstract += entry['text'] +'\n\n'
except KeyError:
pass
docs.append([abstract])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment