Skip to main content

CiteXtract - Bringing structure to the papers on ArXiv.

Project description

CiteXtract

Read the Docs CircleCI Docker Cloud Build Status PyPI - Python Version

CiteXtract - Bringing structure to the papers on ArXiv.

Getting started

In order to install CiteXtract, run the following command:

pip install citextract

Extracting references

Then, one can extract references from a text using the RefXtract model:

from citextract.models.refxtract import RefXtractor

refxtractor = RefXtractor().load()
text = """This is a test sentence.\n[1] Jacobs, K. 2019. This is a test title. In Proceedings of Some Journal."""
refs = refxtractor(text)
print(refs)

It gives the following output:

['[1] Jacobs, K. 2019. This is a test title. In Proceedings of Some Journal.']

Under the hood, a trained neural network extracts reference boundaries and extracts the references by using these boundaries.

Extracting titles

Using the found references, titles can be extracted by using the TitleXtract model:

from citextract.models.titlextract import TitleXtractor

titlextractor = TitleXtractor().load()
ref = """[1] Jacobs, K. 2019. This is a test title. In Proceedings of Some Journal."""
title = titlextractor(ref)
print(title)

It gives the following output:

'This is a test title.'

Here, a trained neural network extracts the titles from the given reference.

Converting an arXiv PDF to text

There is a utility available which takes an arXiv URL and converts it to text:

from citextract.utils.pdf import convert_pdf_url_to_text

pdf_url = 'https://arxiv.org/pdf/some_file.pdf'
text = convert_pdf_url_to_text(pdf_url)
print(text)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for citextract, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size citextract-0.0.4-py3-none-any.whl (12.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size citextract-0.0.4.tar.gz (8.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page