Contribute and Support
- fetch pubmed ids (pmids) based on keyword query (supports multiple keywords query)
- Fetch Abstract of research papers from pubmed based on pmids
- Download the full pdf of respective pmid -> if available on pubmedcentral (pmc)
- if pdf not available on pmc -> download from scihub internally
- Follow this tutorial
pip install pubmedflow
python setup.py install
OR
pip install git+https://github.com/nfflow/pubmedflow
Arguments:
Name | Input | Description |
---|---|---|
folder_name | Optional, str | path to store output data |
import eutils
from pubmedflow import LazyPubmed
pb = LazyPubmed(title_query,
folder_name='pubmed_data',
api_key='',
max_documents=None,
download_pdf=True,
scihub=False)
pb.pubmed_train(model_name='sentence-transformers/all-mpnet-base-v2',
model_output_path='pubmedflow_model',
model_architecture='ct')
qa_results = pb.pubmed_qa(qa_query = 'What are the chronic diseases',)
print(qa_results)
summ_results = pb.pubmed_summarise()
print(summ_results)
ents = pb.pubmed_entity_extraction()
print(ents)