This repository has been archived by the owner on Sep 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 47
/
README.Rmd
119 lines (85 loc) · 4.15 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
```{r echo=FALSE}
knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE,
warning = FALSE,
message = FALSE
)
```
fulltext
========
[![cran checks](https://cranchecks.info/badges/flavor/release/fulltext)](https://cranchecks.info/pkgs/fulltext)
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![R-check](https://github.com/ropensci/fulltext/workflows/R-check/badge.svg)](https://github.com/ropensci/fulltext/actions/)
[![codecov](https://codecov.io/gh/ropensci/fulltext/branch/master/graph/badge.svg)](https://codecov.io/gh/ropensci/fulltext)
[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/fulltext)](https://github.com/r-hub/cranlogs.app)
[![cran version](https://www.r-pkg.org/badges/version/fulltext)](https://cran.r-project.org/package=fulltext)
__Get full text research articles__
Checkout the [package docs][docs] and the [fulltext manual][ftbook] to get started.
-----
rOpenSci has a number of R packages to get either full text, metadata, or both from various publishers. The goal of `fulltext` is to integrate these packages to create a single interface to many data sources.
`fulltext` makes it easy to do text-mining by supporting the following steps:
* Search for articles - `ft_search`
* Fetch articles - `ft_get`
* Get links for full text articles (xml, pdf) - `ft_links`
* Extract text from articles / convert formats - `ft_extract`
* Collect all texts into a data.frame - `ft_table`
Previously supported use cases, extracted out to other packages:
* Collect bits of articles that you actually need - moved to package `pubchunks`
* Supplementary data from papers has been moved to the `suppdata`
It's easy to go from the outputs of `ft_get` to text-mining packages such as
`tm` and `quanteda`
Data sources in `fulltext` include:
* Crossref - via the `rcrossref` package
* Public Library of Science (PLOS) - via the `rplos` package
* Biomed Central
* arXiv - via the `aRxiv` package
* bioRxiv - via the `biorxivr` package
* PMC/Pubmed via Entrez - via the `rentrez` package
* Scopus - internal tooling
* Semantic Scholar - internal tooling
* Many more are supported via the above sources (e.g., _Royal Society Open Science_ is
available via Pubmed)
* We __will__ add more, as publishers open up, and as we have time...See the issues
Authentication: A number of publishers require authentication via API key, and some even more
draconian authentication processes involving checking IP addresses. We are working on supporting
all the various authentication things for different publishers, but of course all the OA content
is already easily available. See the **Authentication** section in `?fulltext-package` after
loading the package.
We'd love your feedback. Let us know what you think in the issue tracker
## Installation
Stable version from CRAN
```{r eval=FALSE}
install.packages("fulltext")
```
Development version from GitHub
```{r eval=FALSE}
remotes::install_github("ropensci/fulltext")
```
Load library
```{r}
library('fulltext')
```
## Interoperability with other packages downstream
Note: this example not included in vignettes as that would require the two below packages in Suggests here. To see many examples and documentation see the [package docs][docs] and the [fulltext manual][ftbook].
```{r eval=FALSE}
cache_options_set(path = (td <- 'foobar'))
res <- ft_get(c('10.7554/eLife.03032', '10.7554/eLife.32763'), type = "pdf")
library(readtext)
x <- readtext::readtext(file.path(cache_options_get()$path, "*.pdf"))
```
```{r eval=FALSE}
library(quanteda)
quanteda::corpus(x)
```
## Contributors
* Scott Chamberlain
* Will Pearse
* Katrin Leinweber
## Meta
* Please [report any issues or bugs](https://github.com/ropensci/fulltext/issues).
* License: MIT
* Get citation information for `fulltext`: `citation(package = 'fulltext')`
* Please note that this package is released with a [Contributor Code of Conduct](https://ropensci.org/code-of-conduct/). By contributing to this project, you agree to abide by its terms.
[docs]: https://docs.ropensci.org/fulltext/
[ftbook]: https://books.ropensci.org/fulltext/