{"id":18011579,"url":"https://github.com/titipata/scipdf_parser","last_synced_at":"2025-05-16T12:12:28.438Z","repository":{"id":47010170,"uuid":"195094164","full_name":"titipata/scipdf_parser","owner":"titipata","description":"Python PDF parser for scientific publications: content and figures","archived":false,"fork":false,"pushed_at":"2024-03-21T09:30:04.000Z","size":30619,"stargazers_count":402,"open_issues_count":17,"forks_count":64,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-17T12:09:04.764Z","etag":null,"topics":["grobid","parser","pdf","pdf-parser","python-parser","scipdf-parser"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/titipata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-03T16:50:01.000Z","updated_at":"2025-04-14T20:27:50.000Z","dependencies_parsed_at":"2024-06-19T15:08:54.515Z","dependency_job_id":"a32fcd70-e9db-4552-9673-9df066711f77","html_url":"https://github.com/titipata/scipdf_parser","commit_stats":{"total_commits":29,"total_committers":3,"mean_commits":9.666666666666666,"dds":0.1724137931034483,"last_synced_commit":"71ca5c02d368779346f34652474bdc5059e5898f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titipata%2Fscipdf_parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titipata%2Fscipdf_parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titipata%2Fscipdf_parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titipata%2Fscipdf_parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/titipata","download_url":"https://codeload.github.com/titipata/scipdf_parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254527099,"owners_count":22085919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grobid","parser","pdf","pdf-parser","python-parser","scipdf-parser"],"created_at":"2024-10-30T03:11:44.444Z","updated_at":"2025-05-16T12:12:23.427Z","avatar_url":"https://github.com/titipata.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SciPDF Parser\n\nA Python parser for scientific PDF based on [GROBID](https://github.com/kermitt2/grobid).\n\n## Installation\n\nUse `pip` to install from this Github repository\n\n```bash\npip install git+https://github.com/titipata/scipdf_parser\n```\n\n**Note**\n* We also need an `en_core_web_sm` model for spacy, where you can run `python -m spacy download en_core_web_sm` to download it\n* You can change GROBID version in `serve_grobid.sh` to test the parser on a new GROBID version\n\n## Usage\n\nRun the GROBID using the given bash script before parsing PDF. \n\n**NOTE**: the recommended way to [run grobid is via docker](https://grobid.readthedocs.io/en/latest/Grobid-docker/), so make sure it's running on your machine. Update the script so that you are using [latest version](https://github.com/kermitt2/grobid/releases). Generally, at every version there are substantial improvements. \n\n```bash\nbash serve_grobid.sh\n```\n\nThis script will run GROBID at default port 8070 (see more [here](https://grobid.readthedocs.io/en/latest/Grobid-service/)).\nTo parse a PDF provided in `example_data` folder or direct URL, use the following function:\n\n```python\nimport scipdf\narticle_dict = scipdf.parse_pdf_to_dict('example_data/futoma2017improved.pdf') # return dictionary\n \n# option to parse directly from URL to PDF, if as_list is set to True, output 'text' of parsed section will be in a list of paragraphs instead\narticle_dict = scipdf.parse_pdf_to_dict('https://www.biorxiv.org/content/biorxiv/early/2018/11/20/463760.full.pdf', as_list=False)\n\n# output example\n\u003e\u003e {\n    'title': 'Proceedings of Machine Learning for Healthcare',\n    'abstract': '...',\n    'sections': [\n        {'heading': '...', 'text': '...'},\n        {'heading': '...', 'text': '...'},\n        ...\n    ],\n    'references': [\n        {'title': '...', 'year': '...', 'journal': '...', 'author': '...'},\n        ...\n    ],\n    'figures': [\n        {'figure_label': '...', 'figure_type': '...', 'figure_id': '...', 'figure_caption': '...', 'figure_data': '...'},\n        ...\n    ],\n    'doi': '...'\n}\n\nxml = scipdf.parse_pdf('example_data/futoma2017improved.pdf', soup=True) # option to parse full XML from GROBID\n```\n\nTo parse figures from PDF using [pdffigures2](https://github.com/allenai/pdffigures2), you can run\n\n```python\nscipdf.parse_figures('example_data', output_folder='figures') # folder should contain only PDF files\n```\n\nYou can see example output figures in `figures` folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftitipata%2Fscipdf_parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftitipata%2Fscipdf_parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftitipata%2Fscipdf_parser/lists"}