LucaCappelletti94 / pubmed_embedding

Building a pubmed graph, automatically.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PubMed embedding

Pypi project Pypi total project downloads Paper

Building PubMed embedding, automatically.

Install the package

As usual, just install from Pypi:

pip install pubmed_embedding

Usage examples

You can retrieve embedding for PubMed IDs of interest as such:

BERT

from pubmed_embedding import get_pubmed_embedding_from_curies

pubmed_ids = ["PMID:24774509", "PMID:15170967", "PMID:7850793"]

bert_features = get_pubmed_embedding_from_curies(
    curies=pubmed_ids,
    version="pubmed_bert_30_11_2022"
)

And the result is:

BERT

SciBERT

scibert_features = get_pubmed_embedding_from_curies(
    curies=pubmed_ids,
    version="pubmed_scibert_30_11_2022"
)

And the result is:

SciBERT

Specter

spected_features = get_pubmed_embedding_from_curies(
    curies=pubmed_ids,
    version="pubmed_specter_30_11_2022"
)

And the result is:

Specter

Citing this work

If you have found these datasets useful, please do cite:

@software{cappellettiPubMed2022,
    author = {Cappelletti, Luca and Fontana, Tommaso and Reese, Justin},
    month = {12},
    title = {{BM25-weighted BERT-based embedding of PubMed}},
    url = {https://github.com/LucaCappelletti94/pubmed_embedding},
    version = {1.0.14},
    year = {2022}
}

About

Building a pubmed graph, automatically.

License:MIT License


Languages

Language:Rust 82.2%Language:Python 17.8%