|
1 | 1 |
|
2 | 2 |
|
3 | | -# Research Software Extraction Framework (RSEF) |
4 | | -README IN PROGRESS |
5 | | -## Introduction |
6 | | - |
7 | | -This tool verifies the link between a scientific paper and a software repository. It accomplishes this by locating the URL of the software repository within the scientific paper. It then extracts the repository's metadata to find any URLs associated with scientific papers and checks if they lead back to the original paper. If a bidirectional link is established, it marks it as "bidirectional". |
8 | 3 |
|
9 | | -There is also a "unidirectional" metric, which finds a repository url and see's within the repository if the paper is named. |
10 | | - |
11 | | -## Dependencies |
12 | | -- Python 3.10 |
13 | | -- Java 8 or above (please see [Tika requirements](https://tika.apache.org)) |
14 | | - |
15 | | -## Installation |
16 | | - |
17 | | -Install the required dependencies by running: |
18 | | -``` |
19 | | -pip install -r requirements.txt |
20 | | -``` |
21 | | -Highly recommended steps: |
22 | | - |
23 | | -```text |
24 | | -somef configure |
25 | | -``` |
26 | | -You will be asked to provide: |
27 | | - |
28 | | -* A GitHub authentication token [**optional, leave blank if not used**], which SOMEF uses to retrieve metadata from GitHub. If you don't include an authentication token, you can still use SOMEF. However, you may be limited to a series of requests per hour. For more information, see [https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) |
| 4 | +# Research Software Extraction Framework (RSEF) |
| 5 | + |
29 | 6 |
|
30 | | -* The path to the trained classifiers (pickle files). If you have your own classifiers, you can provide them here. Otherwise, you can leave it blank |
| 7 | +## Introduction |
31 | 8 |
|
32 | | -### Docker |
33 | | -TODO |
| 9 | +This tool verifies the link between a scientific paper and a software repository. It accomplishes this by locating the URL of the software repository within the scientific paper. It then extracts the repository's metadata to find any URLs associated with scientific papers and checks if they lead back to the original paper. If a bidirectional link is established, it marks it as "bidirectional". |
34 | 10 |
|
35 | | -## Usage |
36 | 11 |
|
37 | | - To see an example of usage please look at [example.ipynb](./example/example.ipynb) |
| 12 | + |
| 13 | +There is also a "unidirectional" metric, which finds a repository url and see's within the repository if the paper is named. |
| 14 | + |
| 15 | +## Dependencies |
| 16 | + |
| 17 | +- Python 3.9 |
| 18 | + |
| 19 | +- Java 8 or above (please see [Tika requirements](https://pypi.org/project/tika/)) |
| 20 | + |
| 21 | +## Installation |
| 22 | + |
| 23 | +Install the required dependencies by running: |
| 24 | + |
| 25 | +``` |
| 26 | +
|
| 27 | +pip install -e . |
| 28 | +
|
| 29 | +``` |
| 30 | + |
| 31 | +Highly recommended steps: |
| 32 | + |
| 33 | +```text |
| 34 | +
|
| 35 | +somef configure |
| 36 | +
|
| 37 | +``` |
| 38 | + |
| 39 | +You will be asked to provide: |
| 40 | + |
| 41 | +* A GitHub authentication token [**optional, leave blank if not used**], which SOMEF uses to retrieve metadata from GitHub. If you don't include an authentication token, you can still use SOMEF. However, you may be limited to a series of requests per hour. For more information, see [https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) |
| 42 | + |
| 43 | +* The path to the trained classifiers (pickle files). If you have your own classifiers, you can provide them here. Otherwise, you can leave it blank |
| 44 | + |
38 | 45 |
|
39 | | -### The repository is divided into the following directories: |
| 46 | + |
| 47 | +## Usage |
| 48 | + |
| 49 | +```text |
| 50 | +
|
| 51 | +Usage: rsef [OPTIONS] COMMAND [ARGS]... |
| 52 | +
|
| 53 | +RRRRRRRRR SSSSSSSSS EEEEEEEEE FFFFFFFFF |
| 54 | +RRR RRR SSS SSS EEE FFF |
| 55 | +RRR RRR SSSS EEE FFF |
| 56 | +RRRRRRRRR SSSSSSSSS EEEEEEE FFFFFFF |
| 57 | +RRR RRR SSSS EEE FFF |
| 58 | +RRR RRR SSS SSS EEE FFF |
| 59 | +RRR RRR SSSSSSSS EEEEEEEEE FFF |
40 | 60 | |
41 | | -1. Download_pdf |
| 61 | +Research Software Extraction Framework (RSEF)\n |
| 62 | +Find and assess Research Software within Research papers. |
| 63 | +
|
| 64 | +Usage: |
| 65 | +1. (assess) Assess doi for unidirectionality or bidirectionality |
| 66 | +2. (download) Download PDF (paper) from a doi or list |
| 67 | +3. (process) Process downloaded pdf to find urls and abstract |
| 68 | +
|
| 69 | +Options: |
| 70 | +--version Show the version and exit. |
| 71 | +-h, --help Show this message and exit. |
| 72 | +
|
| 73 | +Commands: |
| 74 | + assess |
| 75 | + download |
| 76 | + process |
| 77 | + |
| 78 | +``` |
| 79 | + |
| 80 | +### Assess |
| 81 | + |
| 82 | +The assess command allows for a user to determine whether a given Identifier, in this case ArXiv or DOI, is bidirectional or not. |
| 83 | + |
| 84 | +The command allows for the user to input a single DOI/ArXiv, a list of identifiers given as a ```.txt```, or a ```processed_metadata.json``` |
| 85 | + |
| 86 | + |
| 87 | +```text |
| 88 | +rsef assess -h |
| 89 | +Usage: sskg assess [OPTIONS] |
| 90 | +
|
| 91 | +Options: |
| 92 | +
|
| 93 | +-i, --input <name> DOI, path to .txt list of DOIs or path to processed_metadata.json [required] |
| 94 | +
|
| 95 | +-o, --output <path> Output csv file [default: output] |
| 96 | +
|
| 97 | +-U, --unidir Unidirectionality |
| 98 | +
|
| 99 | +-B, --bidir Bidirectionality |
| 100 | +
|
| 101 | +-h, --help Show this message and exit. |
| 102 | +``` |
| 103 | + |
| 104 | +### Download |
| 105 | + |
| 106 | +The download command allows for a user to download the pdf with its metadata given an Identifier: ArXiv or DOI. Alongside the PDFs folder there will be a `download_metadata.json` which will have the Title, DOI, ArXiv and filename/filepath for each paper downloaded. |
| 107 | +``` |
| 108 | +rsef download -h |
| 109 | +Usage: rsef download [OPTIONS] |
| 110 | +
|
| 111 | +Options: |
| 112 | +
|
| 113 | +-i, --input <name> DOI or path to .txt list of DOIs [required] |
| 114 | +
|
| 115 | +-o, --output <path> Output Directory [default: ./] |
| 116 | +
|
| 117 | +-h, --help Show this message and exit. |
| 118 | +``` |
| 119 | + |
| 120 | +### Processed |
| 121 | + |
| 122 | +The process command allows to take Identifier, or downloaded paper and process it to extract the abstract and github and zenodo urls. These will be saved in a json named ```processed_metadata.json``` |
| 123 | +``` |
| 124 | +rsef process -h |
| 125 | +Usage: rsef process [OPTIONS] |
| 126 | +
|
| 127 | +Options: |
| 128 | +
|
| 129 | +-i, --input <name> DOI, path to .txt list of DOIs or path to downloaded_metadata.json [required] |
| 130 | +
|
| 131 | +-o, --output <path> Output Directory [default: ./] |
| 132 | +
|
| 133 | +-h, --help Show this message and exit. |
| 134 | +``` |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | +### The repository is divided into the following directories: |
| 140 | + |
| 141 | +1. Download_pdf |
| 142 | + |
42 | 143 | 2. Metadata |
| 144 | + |
43 | 145 | 3. Extraction |
44 | | -4. Object_creator |
| 146 | + |
| 147 | +4. Object_creator |
| 148 | + |
45 | 149 | 5. Modelling |
| 150 | + |
46 | 151 | 6. Prediction |
47 | | - |
48 | | -### Download_pdf |
49 | | -Pertains to all the downloading of pdfs. |
50 | | -Downloaded_obj is a representation of downloaded papers which have not been processed yet. |
| 152 | + |
| 153 | +7. Utils |
| 154 | + |
51 | 155 |
|
52 | 156 | ### Metadata |
53 | | -TODO |
54 | | -Encompasses petitions to OpenAlex for fetching the paper's metadata. |
| 157 | + |
| 158 | + |
| 159 | +Encompasses all petitions to OpenAlex and other api's for fetching the paper's metadata or general requests. |
| 160 | + |
55 | 161 | MetadataObj contains the metadata from OpenAlex: doi, arxiv and its title. |
56 | 162 |
|
| 163 | +### Download_pdf |
| 164 | + |
| 165 | +Pertains to all the downloading of pdfs. |
| 166 | + |
| 167 | +Downloaded_obj is a representation of downloaded papers which have not been processed yet. |
| 168 | + |
| 169 | +Contains: |
| 170 | + |
| 171 | + - Title |
| 172 | + - DOI |
| 173 | + - ArXiv |
| 174 | + - file_path |
| 175 | + - file_name |
| 176 | + |
| 177 | +These objects are normally saved into a `downloaded_metadata.json` |
| 178 | + |
| 179 | + |
| 180 | + |
57 | 181 | ### Extraction |
58 | | -TODO |
| 182 | + |
| 183 | + |
| 184 | + |
59 | 185 | Tika scripts to open a pdf and extract its urls are also found witin this module. |
60 | | -PaperObj is created once the downloadedObj's pdf has been processed to locate all its urls. Contains: doi, arxiv, title, file_path, urls. |
61 | | -Finally, the necessary functions dowloading a repository and extracting its metadata with SOMEF |
| 186 | + |
| 187 | +PaperObj is created once the downloadedObj's pdf has been processed to locate all its urls. |
| 188 | +Contains: |
| 189 | +- DOI |
| 190 | +- arXiv |
| 191 | +- Abstract |
| 192 | +- Title |
| 193 | +- File_path |
| 194 | +- File_name |
| 195 | +- URLs |
| 196 | + |
| 197 | +Finally, the necessary functions downloading a repository and extracting its metadata with SOMEF |
| 198 | + |
| 199 | + |
62 | 200 |
|
63 | 201 | ### Modelling |
64 | | -Contains all assessment of bidirectionality and unidirectionality. |
65 | | -Mainly receives a paperObj and a repository_metadata json. |
| 202 | + |
| 203 | +Contains all assessment of bi-directionality and uni-directionality. |
| 204 | + |
| 205 | +Receives a paperObj and a repository_metadata json. |
| 206 | + |
| 207 | + |
66 | 208 |
|
67 | 209 | ### Object Creator |
68 | | -This is the pipeline broken down into its main parts. Please look at [pipeline.py](./object_creator/pipeline.py) and [example.ipynb](./example/example.ipynb) to view the execution process. |
| 210 | + |
| 211 | +This is the pipeline broken down into its main parts. Please look at [pipeline.py](./object_creator/pipeline.py) to view the execution process. |
| 212 | + |
| 213 | + |
69 | 214 |
|
70 | 215 | ### Prediction |
| 216 | + |
71 | 217 | For assessment of the program against its corpus. The corpus can be found within [corpus.csv](./predicition/corpus.csv) and the f1 score obtained bidirectional: [corpus_eval_bidir.json](./predicition/corpus_eval_bidir.json) and the same for the unidirectional (_unidir) |
72 | 218 |
|
73 | 219 |
|
| 220 | +## Tests |
| 221 | + |
| 222 | +Tests can be found in the `./tests` folder |
74 | 223 |
|
75 | | -## License |
76 | | - |
77 | | -This project is licensed under the [MIT License](LICENSE). |
| 224 | + |
| 225 | +## License |
| 226 | + |
| 227 | +This project is licensed under the [MIT License](LICENSE). |
0 commit comments