You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CODE_OF_CONDUCT.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe
34
34
35
35
## Enforcement
36
36
37
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
37
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
38
39
39
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
Copy file name to clipboardExpand all lines: README.md
+79-15Lines changed: 79 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,24 +6,53 @@
6
6
7
7
# **MetaExtractor: Finding Fossils in the Literature**
8
8
9
-
This project aims to identify research articles which are relevant to the [*Neotoma Paleoecological Database*](http://neotomadb.org) (Neotoma), extract data relevant to Neotoma from the article, and provide a mechanism for the data to be reviewed by Neotoma data stewards then submitted to Neotoma. It is being completed as part of the *University of British Columbia (UBC)*[*Masters of Data Science (MDS)*](https://masterdatascience.ubc.ca/) program in partnership with the [*Neotoma Paleoecological Database*](http://neotomadb.org).
9
+
This project aims to identify research articles which are relevant to the [_Neotoma Paleoecological Database_](http://neotomadb.org) (Neotoma), extract data relevant to Neotoma from the article, and provide a mechanism for the data to be reviewed by Neotoma data stewards then submitted to Neotoma. It is being completed as part of the _University of British Columbia (UBC)_[_Masters of Data Science (MDS)_](https://masterdatascience.ubc.ca/) program in partnership with the [_Neotoma Paleoecological Database_](http://neotomadb.org).
10
+
11
+
**Table of Contents**
12
+
13
+
-[**MetaExtractor: Finding Fossils in the Literature**](#metaextractor-finding-fossils-in-the-literature)
-[**Directory Structure and Description**](#directory-structure-and-description)
27
+
-[**Contributors**](#contributors)
28
+
-[Tips for Contributing](#tips-for-contributing)
10
29
11
30
There are 3 primary components to this project:
31
+
12
32
1.**Article Relevance Prediction** - get the latest articles published, predict which ones are relevant to Neotoma and submit for processing.
13
-
2.**MetaData Extraction Pipeline** - extract relevant entities from the article including geographic locations, taxa, etc.
33
+
2.**MetaData Extraction Pipeline** - extract relevant entities from the article including geographic locations, taxa, etc.
14
34
3.**Data Review Tool** - this takes the extracted data and allows the user to review and correct it for submission to Neotoma.
15
35
16
36

17
37
18
38
## **Article Relevance Prediction**
19
39
20
-
The goal of this component is to monitor and identify new articles that are relevant to Neotoma. This is done by using the public [xDD API](https://geodeepdive.org/) to regularly get recently published articles. Article metadata is queried from the [CrossRef API](https://www.crossref.org/documentation/retrieve-metadata/rest-api/) to obtain data such as journal name, title, abstract and more. The article metadata is then used to predict whether the article is relevant to Neotoma or not. The predicted articles are then submitted to the Data Extraction Pipeline for processing.
40
+
The goal of this component is to monitor and identify new articles that are relevant to Neotoma. This is done by using the public [xDD API](https://geodeepdive.org/) to regularly get recently published articles. Article metadata is queried from the [CrossRef API](https://www.crossref.org/documentation/retrieve-metadata/rest-api/) to obtain data such as journal name, title, abstract and more. The article metadata is then used to predict whether the article is relevant to Neotoma or not.
41
+
42
+
The model was trained on ~900 positive examples (a sample of articles currently contributing to Neotoma) and ~3500 negative examples (a sample of articles unrrelated or closely related to Neotoma). Logistic regression model was chosen for its outstanding performance and interpretability.
43
+
44
+
Articles predicted to be relevant will then be submitted to the Data Extraction Pipeline for processing.
45
+
46
+

47
+
48
+
To run the Docker image for article relevance prediction pipeline, please refer to the instruction [here](docker/article-relevance/README.md)
21
49
22
50
## **Data Extraction Pipeline**
23
51
24
-
The full text is provided by the xDD team for the articles that are deemed to be relevant and a custom trained **Named Entity Recognition (NER)** model is used to extract entities of interest from the article.
52
+
The full text is provided by the xDD team for the articles that are deemed to be relevant and a custom trained **Named Entity Recognition (NER)** model is used to extract entities of interest from the article.
25
53
26
54
The entities extracted by this model are:
55
+
27
56
-**SITE**: name of the excavation site
28
57
-**REGION**: more general regions names to provide context for where sites are located
29
58
-**TAXA**: plant or animal fossil names
@@ -45,8 +74,41 @@ Finally, the extracted data is loaded into the Data Review Tool where members of
45
74
46
75
## How to use this repository
47
76
48
-
WIP
77
+
First, begin by installing the requirements and Docker if not already installed ([Docker install instructions](https://docs.docker.com/get-docker/))
78
+
79
+
```bash
80
+
pip install -r requirements.txt
81
+
```
82
+
83
+
A conda environment file will be provided in the final release.
84
+
85
+
### Entity Extraction Model Training
86
+
87
+
The Entity Extraction Models can be trained using the HuggingFace API by following the instructions in the [Entity Extraction Training README](src/entity_extraction/training/hf_token_classification/README.md).
88
+
89
+
The spaCy model training documentation is a WIP.
90
+
91
+
### Data Review Tool
92
+
93
+
The Data Review Tool can be launched by running the following command from the root directory of this repository:
49
94
95
+
```bash
96
+
docker-compose up --build data-review-tool
97
+
```
98
+
99
+
Once the image is built and the container is running, the Data Review Tool can be accessed at http://localhost:8050/. There is a sample "extracted entities" JSON file provided for demo purposes.
100
+
101
+
### Data Requirements
102
+
103
+
Each of the components of this project have different data requirements. The data requirements for each component are outlined below.
104
+
105
+
#### Article Relevance Prediction
106
+
107
+
The article relevance prediction component requires a list of journals that are relevant to Neotoma. This dataset used to train and develop the model is available for download HERE. TODO: Setup public link for data download from project GDrive.
108
+
109
+
#### Data Extraction Pipeline
110
+
111
+
As the full text articles provided by the xDD team are not publicly available we cannot create a public link to download the labelled training data. For access requests please contact Ty Andrews at [email protected].
50
112
51
113
### Development Workflow Overview
52
114
@@ -60,16 +122,16 @@ WIP
60
122
61
123
WIP
62
124
63
-
### Data Requirements
64
-
65
-
WIP
66
-
67
125
### **Directory Structure and Description**
68
126
69
127
```
70
128
├── .github/ <- Directory for GitHub files
71
129
│ ├── workflows/ <- Directory for workflows
72
130
├── assets/ <- Directory for assets
131
+
├── docker/ <- Directory for docker files
132
+
│ ├── article-relevance/ <- Directory for docker files related to article relevance prediction
133
+
│ ├── data-review-tool/ <- Directory for docker files related to data review tool
134
+
│ ├── entity-extraction/ <- Directory for docker files related to named entity recognition
73
135
├── data/ <- Directory for data
74
136
│ ├── entity-extraction/ <- Directory for named entity extraction data
75
137
│ │ ├── raw/ <- Raw unprocessed data
@@ -94,15 +156,16 @@ WIP
94
156
├── src/ <- Directory for source code
95
157
│ ├── entity_extraction/ <- Directory for named entity recognition code
96
158
│ ├── article_relevance/ <- Directory for article relevance prediction code
97
-
│ └── data_review_tool/ <- Directory for data review tool code
159
+
│ └── data_review_tool/ <- Directory for data review tool code
98
160
├── reports/ <- Directory for reports
99
161
├── tests/ <- Directory for tests
100
162
├── Makefile <- Makefile with commands to perform analysis
101
163
└── README.md <- The top-level README for developers using this project.
102
164
```
165
+
103
166
## **Contributors**
104
167
105
-
This project is an open project, and contributions are welcome from any individual. All contributors to this project are bound by a [code of conduct](https://github.com/NeotomaDB/MetaExtractor/blob/main/CODE_OF_CONDUCT.md). Please review and follow this code of conduct as part of your contribution.
168
+
This project is an open project, and contributions are welcome from any individual. All contributors to this project are bound by a [code of conduct](https://github.com/NeotomaDB/MetaExtractor/blob/main/CODE_OF_CONDUCT.md). Please review and follow this code of conduct as part of your contribution.
106
169
107
170
The UBC MDS project team consists of:
108
171
@@ -112,12 +175,13 @@ The UBC MDS project team consists of:
Issues and bug reports are always welcome. Code clean-up, and feature additions can be done either through pull requests to [project forks](https://github.com/NeotomaDB/MetaExtractor/network/members) or [project branches](https://github.com/NeotomaDB/MetaExtractor/branches).
184
+
Issues and bug reports are always welcome. Code clean-up, and feature additions can be done either through pull requests to [project forks](https://github.com/NeotomaDB/MetaExtractor/network/members) or [project branches](https://github.com/NeotomaDB/MetaExtractor/branches).
121
185
122
186
All products of the Neotoma Paleoecology Database are licensed under an [MIT License](LICENSE) unless otherwise noted.
123
187
@@ -130,4 +194,4 @@ All products of the Neotoma Paleoecology Database are licensed under an [MIT Lic
0 commit comments