summaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/schema.py
diff options
context:
space:
mode:
Diffstat (limited to 'fatcat_scholar/schema.py')
-rw-r--r--fatcat_scholar/schema.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/fatcat_scholar/schema.py b/fatcat_scholar/schema.py
index cf88011..35cf9a1 100644
--- a/fatcat_scholar/schema.py
+++ b/fatcat_scholar/schema.py
@@ -255,6 +255,14 @@ def contrib_affiliation(contrib: ReleaseContrib) -> Optional[str]:
return None
+def es_abstracts_from_grobid(tei_dict: dict) -> List[ScholarAbstract]:
+
+ if tei_dict.get("abstract"):
+ return [ScholarAbstract(lang_code=tei_dict.get("lang"), body=scrub_text(tei_dict["abstract"]))]
+ else:
+ return []
+
+
def es_abstracts_from_release(release: ReleaseEntity) -> List[ScholarAbstract]:
d = dict()