def _parse_references(self, doc): """ Returns the references of a document as a <class 'list'> of <class 'dict'>. This is a list of documents cited by the current document. """ doi = self._parse_doi(doc) #TODO: Get these from the article rather than this API return find_references(doi)
def _parse_references(self, doc): """ Returns the references of a document as a <class 'list'> of <class 'dict'>. This is a list of documents cited by the current document. """ bib_entries = [] if ('bib_entries' in doc and isinstance(doc['bib_entries'], dict) and len(doc['bib_entries']) > 0 ): for bib in doc['bib_entries'].values(): bib_entries.append({ 'ref_id': bib.get('ref_id', ''), 'title': bib.get('title', ''), 'year': bib.get('year', None), 'issn': str(bib.get('issn', '')), 'doi': str(bib.get('other_ids', {}).get('DOI', "")), "text": str(bib.get('other_ids', {}).get('DOI', "")) }) if len(bib_entries) == 0: doi = self._parse_doi(doc) bib_entries = find_references(doi) return bib_entries
def _parse_references(self, doc): """ Returns the references of a document as a <class 'list'> of <class 'dict'>. This is a list of documents cited by the current document. """ doi = self._parse_doi(doc) return find_references(doi)