pubmed-embedding


Namepubmed-embedding JSON
Version 1.0.14 PyPI version JSON
download
home_pagehttps://github.com/LucaCappelletti94/pubmed_graph
SummaryA tool to work with pre-computed large pubmed embedding.
upload_time2022-12-02 18:06:51
maintainer
docs_urlNone
authorLuca Cappelletti
requires_python>=3.6.0
licenseBSD3
keywords scibert pubmed bm25
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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/DOI-10.48550/arXiv.2110.06196-blue.svg
    :target: https://github.com/LucaCappelletti94/pubmed_embedding/blob/main/BM25_weighted_BERT_based_embedding_of_PubMed.pdf
    :alt: Paper
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/LucaCappelletti94/pubmed_graph",
    "name": "pubmed-embedding",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6.0",
    "maintainer_email": "",
    "keywords": "SciBERT,PubMed,BM25",
    "author": "Luca Cappelletti",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/a4/12/04dc1c9ee422036cf60786e0e7c2cd738fc15af3e39229b056274da80f38/pubmed_embedding-1.0.14.tar.gz",
    "platform": null,
    "description": "PubMed embedding\n===================================\n|pip| |downloads| |paper|\n\nBuilding PubMed embedding, automatically.\n\n\nInstall the package\n----------------------------------\nAs usual, just install from Pypi:\n\n.. code:: shell\n\n    pip install pubmed_embedding\n\n\nUsage examples\n----------------------------------\nYou can retrieve embedding for PubMed IDs of interest as such:\n\nBERT\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n    from pubmed_embedding import get_pubmed_embedding_from_curies\n\n    pubmed_ids = [\"PMID:24774509\", \"PMID:15170967\", \"PMID:7850793\"]\n\n    bert_features = get_pubmed_embedding_from_curies(\n        curies=pubmed_ids,\n        version=\"pubmed_bert_30_11_2022\"\n    )\n\nAnd the result is:\n\n|BERT|\n\n\nSciBERT\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n    scibert_features = get_pubmed_embedding_from_curies(\n        curies=pubmed_ids,\n        version=\"pubmed_scibert_30_11_2022\"\n    )\n   \nAnd the result is:\n\n|SciBERT|\n\nSpecter\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n    spected_features = get_pubmed_embedding_from_curies(\n        curies=pubmed_ids,\n        version=\"pubmed_specter_30_11_2022\"\n    )\n\nAnd the result is:\n\n|Specter|\n\nCiting this work\n-----------------------------\nIf you have found these datasets useful, please do cite:\n\n.. code:: bib\n\n    @software{cappellettiPubMed2022,\n        author = {Cappelletti, Luca and Fontana, Tommaso and Reese, Justin},\n        month = {12},\n        title = {{BM25-weighted BERT-based embedding of PubMed}},\n        url = {https://github.com/LucaCappelletti94/pubmed_embedding},\n        version = {1.0.14},\n        year = {2022}\n    }\n\n\n\n.. |BERT| image:: https://github.com/LucaCappelletti94/pubmed_embedding/blob/main/bert.png?raw=true\n.. |SciBERT| image:: https://github.com/LucaCappelletti94/pubmed_embedding/blob/main/scibert.png?raw=true\n.. |Specter| image:: https://github.com/LucaCappelletti94/pubmed_embedding/blob/main/specter.png?raw=true\n\n.. |pip| image:: https://badge.fury.io/py/pubmed-embedding.svg\n    :target: https://badge.fury.io/py/pubmed-embedding\n    :alt: Pypi project\n\n.. |downloads| image:: https://pepy.tech/badge/pubmed-embedding\n    :target: https://pepy.tech/badge/pubmed-embedding\n    :alt: Pypi total project downloads \n\n.. |paper| image:: https://img.shields.io/badge/DOI-10.48550/arXiv.2110.06196-blue.svg\n    :target: https://github.com/LucaCappelletti94/pubmed_embedding/blob/main/BM25_weighted_BERT_based_embedding_of_PubMed.pdf\n    :alt: Paper",
    "bugtrack_url": null,
    "license": "BSD3",
    "summary": "A tool to work with pre-computed large pubmed embedding.",
    "version": "1.0.14",
    "split_keywords": [
        "scibert",
        "pubmed",
        "bm25"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "da227d8455868c13b8ae3b60d022b850",
                "sha256": "4a7b16fe671c00f7725d4bfa5ab1bbeb1afea7e84e2d19f10e7fd21483317f65"
            },
            "downloads": -1,
            "filename": "pubmed_embedding-1.0.14.tar.gz",
            "has_sig": false,
            "md5_digest": "da227d8455868c13b8ae3b60d022b850",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6.0",
            "size": 29951,
            "upload_time": "2022-12-02T18:06:51",
            "upload_time_iso_8601": "2022-12-02T18:06:51.097677Z",
            "url": "https://files.pythonhosted.org/packages/a4/12/04dc1c9ee422036cf60786e0e7c2cd738fc15af3e39229b056274da80f38/pubmed_embedding-1.0.14.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-02 18:06:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "LucaCappelletti94",
    "github_project": "pubmed_graph",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pubmed-embedding"
}
        
Elapsed time: 0.01529s