Skip to content

Commit

Permalink
Fix how title is parsed in SciBite transform
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakunni3 committed Apr 15, 2020
1 parent b587032 commit 3393985
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kg_covid_19/transform_utils/scibite_cord/scibite_cord.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ def parse_annotation_doc(self, node_handle, edge_handle, doc: Dict, subset: str
"""
terms = set()
paper_id = doc['paper_id']

title = None
if 'metadata' in doc:
metadata = doc['metadata']
title = metadata['title'].replace('\n', ' ')
# extract hits from metadata
terms.update(self.extract_termite_hits(metadata))

Expand All @@ -125,7 +126,7 @@ def parse_annotation_doc(self, node_handle, edge_handle, doc: Dict, subset: str
header=self.node_header,
data=[
f"CORD:{paper_id}",
f"{metadata['title']}",
f"{title}",
"biolink:Publication",
""
]
Expand Down

0 comments on commit 3393985

Please sign in to comment.