{ "cells": [ { "cell_type": "code", "execution_count": 19, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...\n", "To disable this warning, you can either:\n", "\t- Avoid using `tokenizers` before the fork if possible\n", "\t- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: pandas in ./.venv/lib/python3.11/site-packages (2.2.2)\r\n", "Requirement already satisfied: pyarrow in ./.venv/lib/python3.11/site-packages (17.0.0)\r\n", "Requirement already satisfied: tqdm in ./.venv/lib/python3.11/site-packages (4.66.4)\r\n", "Requirement already satisfied: nltk in ./.venv/lib/python3.11/site-packages (3.8.1)\r\n", "Requirement already satisfied: sentence-transformers in ./.venv/lib/python3.11/site-packages (3.0.1)\r\n", "Requirement already satisfied: huggingface_hub in ./.venv/lib/python3.11/site-packages (0.24.3)\r\n", "Requirement already satisfied: pyyaml in ./.venv/lib/python3.11/site-packages (6.0.1)\r\n", "Requirement already satisfied: numpy>=1.23.2 in ./.venv/lib/python3.11/site-packages (from pandas) (2.0.1)\r\n", "Requirement already satisfied: python-dateutil>=2.8.2 in ./.venv/lib/python3.11/site-packages (from pandas) (2.9.0.post0)\r\n", "Requirement already satisfied: pytz>=2020.1 in ./.venv/lib/python3.11/site-packages (from pandas) (2024.1)\r\n", "Requirement already satisfied: tzdata>=2022.7 in ./.venv/lib/python3.11/site-packages (from pandas) (2024.1)\r\n", "Requirement already satisfied: click in ./.venv/lib/python3.11/site-packages (from nltk) (8.1.7)\r\n", "Requirement already satisfied: joblib in ./.venv/lib/python3.11/site-packages (from nltk) (1.4.2)\r\n", "Requirement already satisfied: regex>=2021.8.3 in ./.venv/lib/python3.11/site-packages (from nltk) (2024.7.24)\r\n", "Requirement already satisfied: transformers<5.0.0,>=4.34.0 in ./.venv/lib/python3.11/site-packages (from sentence-transformers) (4.43.3)\r\n", "Requirement already satisfied: torch>=1.11.0 in ./.venv/lib/python3.11/site-packages (from sentence-transformers) (2.4.0)\r\n", "Requirement already satisfied: scikit-learn in ./.venv/lib/python3.11/site-packages (from sentence-transformers) (1.5.1)\r\n", "Requirement already satisfied: scipy in ./.venv/lib/python3.11/site-packages (from sentence-transformers) (1.14.0)\r\n", "Requirement already satisfied: Pillow in ./.venv/lib/python3.11/site-packages (from sentence-transformers) (10.4.0)\r\n", "Requirement already satisfied: filelock in ./.venv/lib/python3.11/site-packages (from huggingface_hub) (3.15.4)\r\n", "Requirement already satisfied: fsspec>=2023.5.0 in ./.venv/lib/python3.11/site-packages (from huggingface_hub) (2024.6.1)\r\n", "Requirement already satisfied: packaging>=20.9 in ./.venv/lib/python3.11/site-packages (from huggingface_hub) (24.1)\r\n", "Requirement already satisfied: requests in ./.venv/lib/python3.11/site-packages (from huggingface_hub) (2.32.3)\r\n", "Requirement already satisfied: typing-extensions>=3.7.4.3 in ./.venv/lib/python3.11/site-packages (from huggingface_hub) (4.12.2)\r\n", "Requirement already satisfied: six>=1.5 in ./.venv/lib/python3.11/site-packages (from python-dateutil>=2.8.2->pandas) (1.16.0)\r\n", "Requirement already satisfied: sympy in ./.venv/lib/python3.11/site-packages (from torch>=1.11.0->sentence-transformers) (1.13.1)\r\n", "Requirement already satisfied: networkx in ./.venv/lib/python3.11/site-packages (from torch>=1.11.0->sentence-transformers) (3.3)\r\n", "Requirement already satisfied: jinja2 in ./.venv/lib/python3.11/site-packages (from torch>=1.11.0->sentence-transformers) (3.1.4)\r\n", "Requirement already satisfied: safetensors>=0.4.1 in ./.venv/lib/python3.11/site-packages (from transformers<5.0.0,>=4.34.0->sentence-transformers) (0.4.3)\r\n", "Requirement already satisfied: tokenizers<0.20,>=0.19 in ./.venv/lib/python3.11/site-packages (from transformers<5.0.0,>=4.34.0->sentence-transformers) (0.19.1)\r\n", "Requirement already satisfied: charset-normalizer<4,>=2 in ./.venv/lib/python3.11/site-packages (from requests->huggingface_hub) (3.3.2)\r\n", "Requirement already satisfied: idna<4,>=2.5 in ./.venv/lib/python3.11/site-packages (from requests->huggingface_hub) (3.7)\r\n", "Requirement already satisfied: urllib3<3,>=1.21.1 in ./.venv/lib/python3.11/site-packages (from requests->huggingface_hub) (2.2.2)\r\n", "Requirement already satisfied: certifi>=2017.4.17 in ./.venv/lib/python3.11/site-packages (from requests->huggingface_hub) (2024.7.4)\r\n", "Requirement already satisfied: threadpoolctl>=3.1.0 in ./.venv/lib/python3.11/site-packages (from scikit-learn->sentence-transformers) (3.5.0)\r\n", "Requirement already satisfied: MarkupSafe>=2.0 in ./.venv/lib/python3.11/site-packages (from jinja2->torch>=1.11.0->sentence-transformers) (2.1.5)\r\n", "Requirement already satisfied: mpmath<1.4,>=1.1.0 in ./.venv/lib/python3.11/site-packages (from sympy->torch>=1.11.0->sentence-transformers) (1.3.0)\r\n", "\r\n", "\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m A new release of pip is available: \u001B[0m\u001B[31;49m24.0\u001B[0m\u001B[39;49m -> \u001B[0m\u001B[32;49m24.2\u001B[0m\r\n", "\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m To update, run: \u001B[0m\u001B[32;49mpip install --upgrade pip\u001B[0m\r\n" ] } ], "source": [ "!pip install pandas pyarrow tqdm nltk sentence-transformers huggingface_hub pyyaml\n" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-07-30T17:30:02.287615Z", "start_time": "2024-07-30T17:29:59.759060Z" } }, "id": "7c4973586542f9f0" }, { "cell_type": "code", "execution_count": 20, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[nltk_data] Downloading package punkt to /Users/jtr4v/nltk_data...\n", "[nltk_data] Package punkt is already up-to-date!\n" ] }, { "data": { "text/plain": "True" }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Import necessary libraries\n", "from huggingface_hub import HfApi, create_repo\n", "import yaml\n", "import nltk\n", "\n", "import requests\n", "from tqdm import tqdm\n", "from xml.etree import ElementTree as ET\n", "import pandas as pd\n", "from nltk.tokenize import sent_tokenize\n", "from sentence_transformers import SentenceTransformer\n", "import warnings\n", "\n", "# Download NLTK data\n", "nltk.download('punkt')\n" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-07-30T17:30:02.408371Z", "start_time": "2024-07-30T17:30:02.291039Z" } }, "id": "829144ba3dfd450a" }, { "cell_type": "code", "execution_count": 21, "outputs": [], "source": [ "# Read the PMIDs from the file\n", "pmid_file_path = './pmids.txt'\n", "with open(pmid_file_path, 'r') as f:\n", " pmids = f.read().splitlines()\n" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-07-30T17:30:02.412528Z", "start_time": "2024-07-30T17:30:02.405680Z" } }, "id": "363e4cd840e6d77e" }, { "cell_type": "code", "execution_count": 22, "outputs": [], "source": [ "# Function to fetch a PubMed article in XML format by its PMID\n", "def fetch_pubmed_article(pmid):\n", " url = f\"https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id={pmid}&retmode=xml\"\n", " response = requests.get(url, headers={\"Accept-Encoding\": \"identity\"})\n", " if response.status_code == 200:\n", " return response.content\n", " else:\n", " return None" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-07-30T17:30:02.412760Z", "start_time": "2024-07-30T17:30:02.410489Z" } }, "id": "82ba593571b15599" }, { "cell_type": "code", "execution_count": 23, "outputs": [], "source": [ "# Initialize the sentence transformer model\n", "model = SentenceTransformer('all-MiniLM-L6-v2')\n" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-07-30T17:30:03.403884Z", "start_time": "2024-07-30T17:30:02.413859Z" } }, "id": "82bcb60f882f9c64" }, { "cell_type": "code", "execution_count": null, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Downloading PubMed Articles: 1%| | 69/6593 [00:24<32:04, 3.39it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:28187491 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 1%| | 73/6593 [00:25<31:16, 3.47it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:2143909 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 2%|▏ | 106/6593 [00:38<48:29, 2.23it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:1016976 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 2%|▏ | 137/6593 [00:52<41:05, 2.62it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:11942911 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 5%|▍ | 319/6593 [01:53<29:38, 3.53it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:2908603 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 5%|▌ | 332/6593 [01:58<42:48, 2.44it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:3074131 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 5%|▌ | 343/6593 [02:00<28:15, 3.69it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:3570023 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 5%|▌ | 346/6593 [02:02<46:46, 2.23it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:4060747 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 5%|▌ | 348/6593 [02:02<41:12, 2.53it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:4365448 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 5%|▌ | 349/6593 [02:02<33:57, 3.06it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:4835320 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 6%|▌ | 370/6593 [02:16<1:23:10, 1.25it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:7772169 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 6%|▌ | 374/6593 [02:18<47:20, 2.19it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:7947003 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 6%|▌ | 377/6593 [02:19<40:05, 2.58it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:8142059 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 7%|▋ | 432/6593 [02:38<39:07, 2.62it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:14022451 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 7%|▋ | 457/6593 [02:44<20:18, 5.03it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:12436453 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 7%|▋ | 471/6593 [02:48<27:08, 3.76it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:13678886 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 8%|▊ | 538/6593 [03:11<36:50, 2.74it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:31987274 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 8%|▊ | 540/6593 [03:11<25:18, 3.99it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:35593795 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 8%|▊ | 551/6593 [03:14<27:31, 3.66it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:33410889 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 9%|▊ | 562/6593 [03:20<58:04, 1.73it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:35553753 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 9%|▊ | 564/6593 [03:21<36:03, 2.79it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:35556797 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 10%|▉ | 629/6593 [03:42<56:36, 1.76it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:20799915 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 10%|▉ | 637/6593 [03:44<24:29, 4.05it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:15656346 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 10%|▉ | 655/6593 [03:49<29:30, 3.35it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:6076978 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 10%|▉ | 657/6593 [03:49<21:30, 4.60it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:6896473 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 10%|█ | 660/6593 [03:49<16:30, 5.99it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:11765729 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 11%|█ | 699/6593 [04:04<38:42, 2.54it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:13644254 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 11%|█▏ | 748/6593 [04:19<36:40, 2.66it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:33390801 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 12%|█▏ | 798/6593 [04:38<35:33, 2.72it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:31824318 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 13%|█▎ | 837/6593 [04:50<22:12, 4.32it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:7563172 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 13%|█▎ | 860/6593 [04:58<24:45, 3.86it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:26935538 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 13%|█▎ | 872/6593 [05:03<37:54, 2.52it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:31565830 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 14%|█▍ | 926/6593 [05:22<24:14, 3.90it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:34900981 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 15%|█▍ | 980/6593 [05:38<31:58, 2.93it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:33854437 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 15%|█▌ | 989/6593 [05:41<28:38, 3.26it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:34490047 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 15%|█▌ | 996/6593 [05:43<22:24, 4.16it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:31592109 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 16%|█▌ | 1044/6593 [05:59<28:02, 3.30it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:34751591 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 16%|█▌ | 1060/6593 [06:04<33:44, 2.73it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:3131240 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 16%|█▌ | 1069/6593 [06:07<22:03, 4.17it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:26935012 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 17%|█▋ | 1136/6593 [06:28<31:24, 2.90it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32707827 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 18%|█▊ | 1170/6593 [06:38<20:50, 4.34it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:15642182 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 18%|█▊ | 1171/6593 [06:38<20:15, 4.46it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:20030877 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 19%|█▉ | 1239/6593 [06:57<24:19, 3.67it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32136111 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 19%|█▉ | 1246/6593 [06:58<20:26, 4.36it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:34860884 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 19%|█▉ | 1255/6593 [07:01<26:21, 3.38it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32120753 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 19%|█▉ | 1258/6593 [07:01<16:24, 5.42it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32436244 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 19%|█▉ | 1260/6593 [07:02<14:30, 6.12it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:33300953 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 19%|█▉ | 1264/6593 [07:02<20:10, 4.40it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:34628993 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 19%|█▉ | 1266/6593 [07:03<15:42, 5.65it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:34867401 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 19%|█▉ | 1275/6593 [07:06<31:36, 2.80it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:20032127 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 20%|██ | 1349/6593 [07:33<33:09, 2.64it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:29665663 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 21%|██ | 1363/6593 [07:37<20:09, 4.32it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:36476018 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 21%|██ | 1385/6593 [07:45<29:37, 2.93it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:9260607 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 21%|██ | 1393/6593 [07:46<24:32, 3.53it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:6810311 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 22%|██▏ | 1429/6593 [08:00<22:57, 3.75it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:5083054 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 23%|██▎ | 1489/6593 [08:31<51:28, 1.65it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:11668120 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 23%|██▎ | 1518/6593 [08:42<20:13, 4.18it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:12968098 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 23%|██▎ | 1523/6593 [08:43<17:54, 4.72it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:14668813 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 23%|██▎ | 1542/6593 [08:48<22:59, 3.66it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:15769928 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 24%|██▎ | 1557/6593 [08:51<16:38, 5.04it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:15996830 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 24%|██▍ | 1569/6593 [08:54<24:24, 3.43it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:16341095 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 24%|██▍ | 1570/6593 [08:54<20:58, 3.99it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:16380226 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 24%|██▍ | 1578/6593 [08:56<30:20, 2.75it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:16740543 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 24%|██▍ | 1596/6593 [09:01<23:24, 3.56it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:17114665 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 24%|██▍ | 1602/6593 [09:03<33:11, 2.51it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:17239269 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 24%|██▍ | 1604/6593 [09:04<28:31, 2.92it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:17307082 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 25%|██▍ | 1618/6593 [09:07<22:07, 3.75it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:17685248 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 25%|██▍ | 1627/6593 [09:10<20:47, 3.98it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:18037293 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 25%|██▍ | 1646/6593 [09:19<50:11, 1.64it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:18455358 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 25%|██▌ | 1652/6593 [09:21<23:34, 3.49it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:18565752 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 26%|██▌ | 1716/6593 [09:40<22:50, 3.56it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:20727234 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 27%|██▋ | 1770/6593 [09:56<21:50, 3.68it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:22265695 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 28%|██▊ | 1826/6593 [10:13<27:12, 2.92it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:23867125 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 28%|██▊ | 1855/6593 [10:24<22:13, 3.55it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:24624538 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 29%|██▉ | 1910/6593 [10:54<55:59, 1.39it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:26370026 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 29%|██▉ | 1921/6593 [10:57<43:07, 1.81it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:2679845 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 29%|██▉ | 1937/6593 [11:10<1:05:50, 1.18it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:27165143 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 29%|██▉ | 1944/6593 [11:13<47:25, 1.63it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:27268511 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 30%|██▉ | 1950/6593 [11:16<56:38, 1.37it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:27599035 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 30%|██▉ | 1956/6593 [11:20<45:27, 1.70it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:27790931 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 30%|███ | 1989/6593 [11:36<53:14, 1.44it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:28727864 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 30%|███ | 1990/6593 [11:36<41:38, 1.84it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:28727870 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 30%|███ | 1991/6593 [11:37<33:04, 2.32it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:28727878 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 30%|███ | 1998/6593 [11:40<58:05, 1.32it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:28947566 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 31%|███▏ | 2075/6593 [12:21<1:24:29, 1.12s/it]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:31188955 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 32%|███▏ | 2099/6593 [12:38<40:43, 1.84it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32018570 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 32%|███▏ | 2112/6593 [12:42<21:06, 3.54it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32560000 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 32%|███▏ | 2123/6593 [12:45<22:38, 3.29it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32924570 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 32%|███▏ | 2125/6593 [12:45<16:01, 4.64it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32924574 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 33%|███▎ | 2165/6593 [13:03<19:50, 3.72it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:9376202 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 33%|███▎ | 2180/6593 [13:13<1:09:00, 1.07it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:10326711 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 33%|███▎ | 2190/6593 [13:19<58:38, 1.25it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32136135 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 33%|███▎ | 2194/6593 [13:19<23:29, 3.12it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:33859534 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 33%|███▎ | 2203/6593 [13:26<52:20, 1.40it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:27805627 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 33%|███▎ | 2204/6593 [13:26<40:19, 1.81it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:23335549 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 33%|███▎ | 2208/6593 [13:26<16:19, 4.48it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32084882 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 34%|███▎ | 2221/6593 [13:33<35:57, 2.03it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:33173241 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 34%|███▍ | 2226/6593 [13:36<54:30, 1.34it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:33704214 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 34%|███▍ | 2233/6593 [13:39<53:35, 1.36it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:34296283 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 35%|███▍ | 2294/6593 [14:11<22:51, 3.13it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:19127686 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 35%|███▍ | 2303/6593 [14:17<54:52, 1.30it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:10463993 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 42%|████▏ | 2744/6593 [18:54<42:13, 1.52it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:26069790 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 42%|████▏ | 2745/6593 [18:55<33:20, 1.92it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:28840064 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 42%|████▏ | 2757/6593 [19:02<31:48, 2.01it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:35030448 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 42%|████▏ | 2767/6593 [19:08<38:24, 1.66it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:34946256 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 45%|████▌ | 2982/6593 [21:13<54:05, 1.11it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:33332187 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 46%|████▋ | 3054/6593 [21:50<19:01, 3.10it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32385136 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 47%|████▋ | 3114/6593 [22:24<44:46, 1.29it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:21070449 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 47%|████▋ | 3130/6593 [22:32<25:01, 2.31it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:17443004 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 51%|█████ | 3341/6593 [24:35<32:05, 1.69it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:7169949 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 51%|█████ | 3342/6593 [24:35<25:47, 2.10it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:7438125 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 51%|█████▏ | 3385/6593 [24:55<20:31, 2.61it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:21482991 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 54%|█████▍ | 3549/6593 [26:32<37:43, 1.34it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:20166671 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 55%|█████▌ | 3649/6593 [27:32<32:57, 1.49it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:9733482 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 63%|██████▎ | 4148/6593 [32:35<26:10, 1.56it/s] /var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:29673161 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 64%|██████▍ | 4247/6593 [33:30<33:44, 1.16it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:25482841 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 67%|██████▋ | 4438/6593 [35:18<14:40, 2.45it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:31338934 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 68%|██████▊ | 4513/6593 [36:01<15:57, 2.17it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:14826937 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 68%|██████▊ | 4514/6593 [36:02<17:23, 1.99it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:5240363 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 68%|██████▊ | 4515/6593 [36:02<13:53, 2.49it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:14151168 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 69%|██████▉ | 4546/6593 [36:15<15:18, 2.23it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:31962547 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 69%|██████▉ | 4547/6593 [36:15<12:17, 2.77it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:31971005 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 69%|██████▉ | 4550/6593 [36:16<07:34, 4.50it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32018484 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 69%|██████▉ | 4553/6593 [36:16<05:28, 6.21it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32057255 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 69%|██████▉ | 4555/6593 [36:17<11:14, 3.02it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32067691 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 69%|██████▉ | 4557/6593 [36:18<10:17, 3.30it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32084729 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 69%|██████▉ | 4561/6593 [36:18<05:52, 5.76it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32137961 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 70%|██████▉ | 4593/6593 [36:42<25:18, 1.32it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:33275459 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 70%|██████▉ | 4611/6593 [36:51<15:24, 2.14it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:34039694 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 71%|███████ | 4652/6593 [37:12<13:17, 2.43it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:35291664 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 71%|███████ | 4677/6593 [37:30<19:54, 1.60it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:36300423 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 71%|███████▏ | 4700/6593 [37:42<17:28, 1.81it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:16841595 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 72%|███████▏ | 4725/6593 [37:56<13:30, 2.31it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:31114373 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 72%|███████▏ | 4729/6593 [38:00<28:17, 1.10it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:16905272 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 73%|███████▎ | 4817/6593 [38:42<11:35, 2.56it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:30856079 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 73%|███████▎ | 4820/6593 [38:43<08:56, 3.31it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:401125 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 73%|███████▎ | 4822/6593 [38:43<06:35, 4.48it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:13415910 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 73%|███████▎ | 4824/6593 [38:44<05:40, 5.19it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:13561240 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 75%|███████▍ | 4942/6593 [39:54<10:50, 2.54it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:7933037 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 75%|███████▌ | 4951/6593 [39:57<11:09, 2.45it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32018912 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 76%|███████▌ | 4994/6593 [40:32<17:13, 1.55it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:31023512 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 81%|████████ | 5322/6593 [43:53<08:04, 2.62it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:4094894 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 81%|████████ | 5343/6593 [44:03<09:21, 2.22it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:6831481 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 81%|████████ | 5345/6593 [44:04<08:07, 2.56it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:7438127 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 82%|████████▏ | 5386/6593 [44:29<15:06, 1.33it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:18487580 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 82%|████████▏ | 5392/6593 [44:32<15:36, 1.28it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:4112005 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 82%|████████▏ | 5413/6593 [44:45<15:51, 1.24it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:22931505 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 82%|████████▏ | 5427/6593 [44:50<07:27, 2.60it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:684253 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 82%|████████▏ | 5429/6593 [44:51<04:58, 3.90it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:4649687 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 83%|████████▎ | 5454/6593 [45:05<14:01, 1.35it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:31428132 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 84%|████████▎ | 5508/6593 [45:35<09:32, 1.89it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:197089 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 85%|████████▍ | 5573/6593 [46:25<18:51, 1.11s/it]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:18905572 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 86%|████████▋ | 5693/6593 [47:41<05:46, 2.59it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:11356100 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 86%|████████▋ | 5699/6593 [47:43<05:13, 2.85it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:18457385 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 87%|████████▋ | 5713/6593 [47:54<07:55, 1.85it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:13909997 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 87%|████████▋ | 5720/6593 [47:57<09:27, 1.54it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:5865975 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 88%|████████▊ | 5772/6593 [48:23<06:31, 2.10it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:22082638 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 88%|████████▊ | 5800/6593 [48:40<06:21, 2.08it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:78345 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 88%|████████▊ | 5801/6593 [48:40<05:09, 2.56it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:79122 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 88%|████████▊ | 5806/6593 [48:43<05:49, 2.25it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:6107740 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 88%|████████▊ | 5809/6593 [48:45<09:34, 1.37it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:22716953 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 89%|████████▊ | 5839/6593 [49:00<06:00, 2.09it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:5968627 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 89%|████████▊ | 5841/6593 [49:00<03:45, 3.33it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:14427350 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 89%|████████▊ | 5844/6593 [49:01<02:17, 5.43it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:13528212 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 89%|████████▉ | 5855/6593 [49:08<14:04, 1.14s/it]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32120682 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 89%|████████▉ | 5881/6593 [49:20<07:39, 1.55it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:22621397 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 89%|████████▉ | 5896/6593 [49:33<09:47, 1.19it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:5956633 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 90%|████████▉ | 5906/6593 [49:37<04:38, 2.46it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:24541335 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 90%|█████████ | 5956/6593 [50:08<06:01, 1.76it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:34911912 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 91%|█████████ | 5985/6593 [50:22<09:33, 1.06it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32138101 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 91%|█████████ | 5986/6593 [50:22<07:12, 1.40it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32145769 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 91%|█████████ | 5988/6593 [50:25<09:02, 1.11it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32286699 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 91%|█████████ | 5989/6593 [50:25<06:48, 1.48it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32579834 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 91%|█████████ | 5990/6593 [50:25<06:03, 1.66it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32579835 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 91%|█████████ | 5995/6593 [50:29<07:34, 1.32it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:35417251 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 92%|█████████▏| 6038/6593 [50:54<04:07, 2.24it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:12973858 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 92%|█████████▏| 6052/6593 [51:02<04:17, 2.10it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32138028 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 92%|█████████▏| 6074/6593 [51:14<04:31, 1.91it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32171753 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 92%|█████████▏| 6080/6593 [51:16<03:27, 2.48it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32351879 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 92%|█████████▏| 6091/6593 [51:23<03:34, 2.34it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:32966831 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 93%|█████████▎| 6103/6593 [51:27<03:34, 2.29it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:34795691 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 93%|█████████▎| 6104/6593 [51:27<02:56, 2.77it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:34867360 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 93%|█████████▎| 6139/6593 [51:48<03:53, 1.94it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:36066779 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 93%|█████████▎| 6147/6593 [51:53<05:07, 1.45it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:36386788 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 94%|█████████▎| 6171/6593 [52:05<03:20, 2.10it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:8279774 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 96%|█████████▌| 6328/6593 [53:38<01:58, 2.24it/s]/var/folders/vc/lfqgrrhn56d9yj5fbxbw6qr00000gt/T/ipykernel_48032/3008939645.py:22: UserWarning: PMID PMID:25483671 has an empty abstract\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", "Downloading PubMed Articles: 97%|█████████▋| 6387/6593 [54:10<02:00, 1.71it/s]" ] } ], "source": [ "# Initialize the sentence transformer model\n", "model = SentenceTransformer('all-MiniLM-L6-v2')\n", "\n", "# Fetch articles and process them\n", "pmid_list = []\n", "sentence_list = []\n", "embedding_list = []\n", "\n", "for pmid in tqdm(pmids, desc=\"Downloading PubMed Articles\"):\n", " article_xml = fetch_pubmed_article(pmid)\n", " if article_xml:\n", " # Parse the XML to extract the abstract\n", " root = ET.fromstring(article_xml)\n", " abstract_texts = root.findall(\".//AbstractText\")\n", " try:\n", " abstract = \" \".join(abstract_text.text for abstract_text in abstract_texts if abstract_text.text is not None)\n", " except TypeError:\n", " warnings.warn(f\"PMID {pmid} has no abstract\")\n", " continue\n", " \n", " if not abstract.strip():\n", " warnings.warn(f\"PMID {pmid} has an empty abstract\")\n", " continue\n", "\n", " # Tokenize the abstract into sentences\n", " sentences = sent_tokenize(abstract)\n", " \n", " if not sentences:\n", " warnings.warn(f\"PMID {pmid} resulted in empty sentences after tokenization\")\n", " continue\n", "\n", " # Generate embeddings for each sentence\n", " embeddings = model.encode(sentences)\n", " \n", " # Store the PMIDs, sentences, and embeddings\n", " pmid_list.extend([pmid] * len(sentences))\n", " sentence_list.extend(sentences)\n", " embedding_list.extend(embeddings)\n", "\n", "# Create a DataFrame with PMIDs, sentences, and embeddings\n", "data = {'PMID': pmid_list, 'sentence': sentence_list, 'embedding': embedding_list}\n", "df = pd.DataFrame(data)\n", "\n", "# Save the DataFrame to Parquet format\n", "parquet_file_path = './data/sentence_embeddings.parquet'\n", "df.to_parquet(parquet_file_path, engine='pyarrow', index=False)\n", "\n", "print(f\"Embeddings saved to {parquet_file_path}\")\n" ], "metadata": { "collapsed": false, "is_executing": true, "ExecuteTime": { "start_time": "2024-07-30T17:30:03.407508Z" } }, "id": "7802adc94111daf7" }, { "cell_type": "code", "execution_count": null, "outputs": [], "source": [ "# Generate metadata in venomx format\n", "metadata = {\n", " 'description': 'Embeddings of each sentence in the abstracts of about 6000 selected PubMed articles. Github repo with jupyter notebook and data files is here: https://github.com/justaddcoffee/embed_pubmed',\n", " 'prefixes': {\n", " 'PMID': 'https://pubmed.ncbi.nlm.nih.gov/PMID_'\n", " },\n", " 'model': {\n", " 'name': 'all-MiniLM-L6-v2'\n", " },\n", " 'dataset': {\n", " 'name': 'Pubmed July 2024',\n", " 'url': 'https://huggingface.co/biomedical-translator/pubmed_sentence_embeddings'\n", " }\n", "}\n", "\n", "# Save the metadata to a YAML file\n", "metadata_file_path = './data/metadata.yaml'\n", "with open(metadata_file_path, 'w') as f:\n", " yaml.dump(metadata, f)\n", "\n", "print(f\"Metadata saved to {metadata_file_path}\")" ], "metadata": { "collapsed": false, "is_executing": true }, "id": "eea4fe2a4bdae560" }, { "cell_type": "code", "execution_count": null, "id": "3ca37dc6", "metadata": { "is_executing": true }, "outputs": [], "source": [ "# Upload to Hugging Face\n", "repo_id = \"biomedical-translator/pubmed_sentence_embeddings\"\n", "create_repo(repo_id, repo_type=\"dataset\")\n", "\n", "this_notebook_path = \"pubmed_sentence_embeddings.ipynb\"\n", "\n", "api = HfApi()\n", "files_to_upload = [parquet_file_path, metadata_file_path, this_notebook_path]\n", "\n", "for file in files_to_upload:\n", " api.upload_file(\n", " path_or_fileobj=file,\n", " path_in_repo=file,\n", " repo_id=repo_id,\n", " repo_type=\"dataset\"\n", " )\n", "\n", "print(f\"Files uploaded to Hugging Face in repository: {repo_id}\")\n" ] } ], "metadata": { "kernelspec": { "name": "python3", "language": "python", "display_name": "Python 3 (ipykernel)" } }, "nbformat": 4, "nbformat_minor": 5 }