paper_firehose.core.abstract_source¶
Abstract source interface using Python Protocol for structural subtyping.
Provides a unified interface for fetching abstracts from various sources (Crossref, Semantic Scholar, OpenAlex, PubMed) with fallback support.
Functions
Return abstract sources optimized for biomedical papers. |
|
Return default list of abstract sources in priority order. |
Classes
|
Protocol defining the interface for abstract fetching sources. |
|
Crossref abstract source with DOI lookup and title search. |
OpenAlex abstract source with inverted-index reconstruction. |
|
PubMed abstract source (DOI-based lookup via ESearch + EFetch). |
|
Semantic Scholar abstract source (DOI-based lookup). |
- class paper_firehose.core.abstract_source.AbstractSource(*args, **kwargs)[source]¶
Bases:
ProtocolProtocol defining the interface for abstract fetching sources.
All abstract sources should implement fetch_abstract() method that accepts DOI, title, and optional parameters, returning the abstract text or None if not found.
- class paper_firehose.core.abstract_source.CrossrefSource(max_retries=3)[source]¶
Bases:
objectCrossref abstract source with DOI lookup and title search.
- Parameters:
max_retries (int)
- class paper_firehose.core.abstract_source.OpenAlexSource[source]¶
Bases:
objectOpenAlex abstract source with inverted-index reconstruction.
- class paper_firehose.core.abstract_source.PubMedSource[source]¶
Bases:
objectPubMed abstract source (DOI-based lookup via ESearch + EFetch).
- class paper_firehose.core.abstract_source.SemanticScholarSource[source]¶
Bases:
objectSemantic Scholar abstract source (DOI-based lookup).
- paper_firehose.core.abstract_source.get_biomedical_sources()[source]¶
Return abstract sources optimized for biomedical papers.
Order: PubMed (best for PNAS/biomedical), Crossref, Semantic Scholar, OpenAlex.
- Return type:
- Returns:
List of AbstractSource instances