{"id":20300927,"url":"https://github.com/dsdanielpark/arxiv2text","last_synced_at":"2025-09-05T16:36:15.140Z","repository":{"id":215942906,"uuid":"657860573","full_name":"dsdanielpark/arxiv2text","owner":"dsdanielpark","description":"Converting PDF files to text, mainly with a focus on arXiv papers.","archived":false,"fork":false,"pushed_at":"2024-02-19T17:03:50.000Z","size":95,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-02T05:45:14.895Z","etag":null,"topics":["crawling","data","datamining","translation"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/arxiv2text/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsdanielpark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-06-24T03:31:51.000Z","updated_at":"2024-04-16T06:39:24.000Z","dependencies_parsed_at":"2024-01-09T10:59:43.266Z","dependency_job_id":"0a3f161b-e724-4dcf-be26-3d8bd811e10a","html_url":"https://github.com/dsdanielpark/arxiv2text","commit_stats":null,"previous_names":["dsdanielpark/arxiv2text"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsdanielpark%2Farxiv2text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsdanielpark%2Farxiv2text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsdanielpark%2Farxiv2text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsdanielpark%2Farxiv2text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsdanielpark","download_url":"https://codeload.github.com/dsdanielpark/arxiv2text/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224651566,"owners_count":17347201,"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":["crawling","data","datamining","translation"],"created_at":"2024-11-14T16:22:19.809Z","updated_at":"2024-11-14T16:22:24.006Z","avatar_url":"https://github.com/dsdanielpark.png","language":"Jupyter Notebook","funding_links":["https://www.buymeacoffee.com/parkminwoo"],"categories":[],"sub_categories":[],"readme":"Development Status :: 3 - Alpha\n\n# arxiv2text\n\n\u003cp align=\"left\"\u003e\n\u003ca href=\"https://github.com/dsdanielpark/Bard-API\"\u003e\u003cimg alt=\"PyPI package\" src=\"https://img.shields.io/badge/pypi-arXiv2text-black\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://hits.seeyoufarm.com\"\u003e\u003cimg src=\"https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fdsdanielpark%2Farxiv2text\u0026count_bg=%23000000\u0026title_bg=%23555555\u0026icon=\u0026icon_color=%23E7E7E7\u0026title=hits\u0026edge_flat=false\"/\u003e\u003c/a\u003e\n\u003c!-- \u003ca href=\"https://www.buymeacoffee.com/parkminwoo\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/arial-orange.png\" height=\"20px\"\u003e\u003c/a\u003e --\u003e\n\u003c/p\u003e\n\nA Python package that converts arXiv documents into structured text using arXiv PDF URLs. If it's a PDF link other than arXiv, it's mostly feasible. If extraction to markdown fails, try extracting to text or HTML.\n\nHowever, this package may be extracted as incomplete text, particularly in relation to expressions, as it is used as a sub-package for archival translations into other languages (e.g., Korean). Some parts of the text may be incomplete, and further post-processing will be required. The current plan is to perform self SFT to correctly align these expressions into LaTeX and aim to translate and summarize them using LLM.\n\nWe are considering transformations into the [LaTeXML](https://github.com/brucemiller/LaTeXML) format in the future. Therefore, it is currently challenging to expect a fully complete extraction in a general sense.\n\n\n\u003cbr\u003e\n\n## Install\n```\n$ pip install arxiv2text\n```\n```\n$ pip install git+https://github.com/dsdanielpark/arxiv2text.git\n```\n\n\u003cbr\u003e\n\n## Usage \n\n*arxiv_to_text*\n\n```python\nfrom arxiv2text import arxiv_to_text\n\npdf_url = \"https://arxiv.org/pdf/1706.03762\"\n\nextracted_text = arxiv_to_text(pdf_url, output_dir) # output_dir is optional argument\n```\n\n*arxiv_to_html*\n\n```python\nfrom arxiv2text import arxiv_to_html\n\npdf_url = \"https://arxiv.org/pdf/1706.03762\"\n\noutput_dir = \"output_folder\"\narxiv_to_html(pdf_url, output_dir)\n```\n\n*arxiv_to_md*\n```python\nfrom arxiv2text import arxiv_to_md\n\npdf_url = \"https://arxiv.org/pdf/1706.03762\"\n\noutput_dir = \"output_folder\"\narxiv_to_md(pdf_url, output_dir)\n```\n\n\u003cbr\u003e\n\n## [arXiv API](https://info.arxiv.org/help/api/user-manual.html)\n```python\nimport urllib.request as libreq\nwith libreq.urlopen('http://export.arxiv.org/api/query?search_query=all:electron\u0026start=0\u0026max_results=1') as url:\n  r = url.read()\nprint(r)\n\n```\n\n\u003cbr\u003e\n\n## Project Plan\nI welcome any contributions related to the project plan. Also, I'm waiting for collaborative contributors to enrich the package together. Thank you.\n- Image extraction in paper\n- Extracting annotations and images from the paper and automatically matching them.\n- Conversion with LeTeXML\n- LaTeX syntax error correction\n- Summary and translation based on LLM\n\n\u003cbr\u003e\n\n## License\n[MIT](https://opensource.org/license/mit/) \u003cbr\u003e\n```\nThe MIT License (MIT)\n\nCopyright (c) 2023 Minwoo Park\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n## Bugs and Issues\nSincerely grateful for any reports on new features or bugs. Your valuable feedback on the code is highly appreciated.\n\n\n## Contacts\n- Core maintainer: [Daniel Park, South Korea](https://github.com/DSDanielPark) \u003cbr\u003e\n- E-mail: parkminwoo1991@gmail.com \u003cbr\u003e\n\n  \n*Copyright (c) 2023 MinWoo Park, South Korea*\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsdanielpark%2Farxiv2text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsdanielpark%2Farxiv2text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsdanielpark%2Farxiv2text/lists"}