Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucacappelletti94/pubmed_embedding
Building a pubmed graph, automatically.
https://github.com/lucacappelletti94/pubmed_embedding
Last synced: 4 days ago
JSON representation
Building a pubmed graph, automatically.
- Host: GitHub
- URL: https://github.com/lucacappelletti94/pubmed_embedding
- Owner: LucaCappelletti94
- License: mit
- Created: 2022-06-01T18:15:48.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-14T11:10:37.000Z (6 months ago)
- Last Synced: 2024-10-24T18:15:32.965Z (12 days ago)
- Language: Rust
- Size: 534 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
PubMed embedding
===================================
|pip| |downloads| |paper|Building PubMed embedding, automatically.
Install the package
----------------------------------
As usual, just install from Pypi:.. code:: shell
pip install pubmed_embedding
Usage examples
----------------------------------
You can retrieve embedding for PubMed IDs of interest as such:BERT
~~~~~~~~~~~~~~~~~~~~~~~~~~~~.. code:: python
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~.. code:: python
scibert_features = get_pubmed_embedding_from_curies(
curies=pubmed_ids,
version="pubmed_scibert_30_11_2022"
)
And the result is:|SciBERT|
Specter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~.. code:: python
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:.. code:: bib
@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}
}.. |BERT| image:: https://github.com/LucaCappelletti94/pubmed_embedding/blob/main/bert.png?raw=true
.. |SciBERT| image:: https://github.com/LucaCappelletti94/pubmed_embedding/blob/main/scibert.png?raw=true
.. |Specter| image:: https://github.com/LucaCappelletti94/pubmed_embedding/blob/main/specter.png?raw=true.. |pip| image:: https://badge.fury.io/py/pubmed-embedding.svg
:target: https://badge.fury.io/py/pubmed-embedding
:alt: Pypi project.. |downloads| image:: https://pepy.tech/badge/pubmed-embedding
:target: https://pepy.tech/badge/pubmed-embedding
:alt: Pypi total project downloads.. |paper| image:: https://img.shields.io/badge/Paper-BM25_weighted_BERT_based_embedding_of_PubMed-blue.svg
:target: https://github.com/LucaCappelletti94/pubmed_embedding/blob/main/BM25_weighted_BERT_based_embedding_of_PubMed.pdf
:alt: Paper