Skip to content
/ pyminer Public

Text-mining toolset for Crossref data

License

Notifications You must be signed in to change notification settings

sckott/pyminer

Repository files navigation

pyminer

pypi docs travis coverage

Python client for text mining levaraging Crossrefs Text and Data Mining service.

Source on GitHub at sckott/pyminer

Other Crossref text mining (and related) clients:

Installation

Stable from pypi

pip install pyminer

Development version

[sudo] pip install git+git://github.com/sckott/pyminer.git#egg=pyminer

Search

Strongly recommend for search using your email in the mailto parameter in the Miner() call to get in the "fast lane".

from pyminer import Miner
import os
m = Miner(mailto = os.environ['crossref_email'])
m.search(filter = {'has_full_text': True}, limit = 5)

Fetch

If you have a Crossref Text and Data Mining key/token, you can give it in the tdmkey parameter in the Miner() call

# a Pensoft article
from pyminer import Miner
import os
m = Miner(mailto = os.environ['crossref_email'])
x = m.search(ids = '10.3897/rio.2.e10445')
x
out = x.fetch(type = "pdf")
out
out[0].url
out[0].path
out[0].type
out[0].parse()

# an Elsevier article - BEWARE, they check IP addresses, so your IP address
# must be at a member institution or similar
from pyminer import Miner
import os
m = Miner(mailto = os.environ['crossref_email'], tdmkey = os.environ['CROSSREF_TDM'])
x = m.search(ids = "10.1016/j.funeco.2010.11.003")
out = x.fetch(type = "xml")
out
out[0].path
out[0].parse()

Extract

from pyminer import fetch, extract
url = 'http://www.nepjol.info/index.php/JSAN/article/viewFile/13527/10928'
x = fetch(url)
extract(x.path)

Meta

About

Text-mining toolset for Crossref data

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published