Skip to content

Commit cfc5f43

Browse files
committed
change project structure
1 parent 3157c22 commit cfc5f43

24 files changed

Lines changed: 202 additions & 132 deletions
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Bug Report
3+
about: Report a problem using the Drug Named Entity Recognition Python library
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
## Description
11+
12+
A description of the problem with sufficient detail and context to understand the issue.
13+
14+
## Environment
15+
16+
Provide details regarding the operating system, toolchain, and environment.
17+
18+
## How to Reproduce
19+
20+
1.
21+
2.
22+
3.
23+
24+
## Expected Behaviour
25+
26+
A description of the expected behaviour.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Feature Request
3+
about: Suggest improvements to the Drug Named Entity Recognition Python library
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
## Description
11+
12+
A quick description of the requested feature.
13+
14+
## Rationale
15+
16+
A rationale for why the feature should be implemented in the Country Named Entity Recognition Python library

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
## Description
2+
3+
⚠️ **Please check which files you are pushing! If there is any file where you have just changed whitespace, or changed `"` to `'`, etc, please delete it from your pull request. If you can limit the number of files that you modify in your PR to just what is strictly necessary makes it much simpler to track the edits to the project, and also makes things easier to merge your changes if two people work on the project simultaneously and their changes have to be combined.**
4+
5+
Please include a summary of the change and which issue is fixed. Please also include relevant context. List any dependencies that are required for this change. Ideally we avoid introducing any new third party dependencies in `pyproject.toml` unless absolutely necessary, because this makes the project more susceptible to breaking whenever a third party library is updated. At the moment it's very lightweight with only `requests` as a requirement.
6+
7+
#### Fixes # (issue)
8+
9+
## Type of change
10+
11+
Please delete options that are not relevant.
12+
13+
- [ ] Bug fix (non-breaking change which fixes an issue)
14+
- [ ] New feature (non-breaking change which adds functionality)
15+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
16+
- [ ] Requires a documentation revision
17+
18+
## Testing
19+
20+
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
21+
22+
- [ ] Test A
23+
- [ ] Test B
24+
25+
#### Test Configuration
26+
27+
* Library version:
28+
* OS:
29+
* Toolchain:
30+
31+
## Checklist
32+
33+
- [ ] My PR is for one issue, rather than for multiple unrelated fixes.
34+
- [ ] My code follows the style guidelines of this project. I have applied a Linter (recommended: Pycharm's code formatter) to make my whitespace consistent with the rest of the project.
35+
- [ ] I have performed a self-review of my own code
36+
- [ ] I have commented my code, particularly in hard-to-understand areas
37+
- [ ] I have made corresponding changes to the documentation
38+
- [ ] My changes generate no new warnings
39+
- [ ] I have added tests that prove my fix is effective or that my feature works
40+
- [ ] New and existing unit tests pass locally with my changes
41+
- [ ] Any dependent changes have been merged and published in downstream modules
42+
- [ ] I have checked my code and corrected any misspellings
43+
- [ ] I add third party dependencies only when necessary. If I changed the requirements, it changes in `pyproject.toml`
44+
- [ ] If I introduced a new feature, I documented it ideally in the README examples so that people will know how to use it.

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release Pypi package
2+
3+
on:
4+
release:
5+
types: [created]
6+
workflow_dispatch:
7+
8+
jobs:
9+
deploy:
10+
name: "Build Distribution"
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.x"
18+
- name: Install pypa/build
19+
run: >-
20+
python3 -m
21+
pip install
22+
build twine
23+
- name: Build and publish
24+
env:
25+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
26+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
27+
run: |
28+
python3 -m build
29+
twine upload --repository pypi dist/*

.github/workflows/test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test Pypi package
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- README.md
9+
pull_request:
10+
branches:
11+
- main
12+
paths-ignore:
13+
- README.md
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
python: [3.10.11]
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Setup Python
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ matrix.python }}
28+
- name: Install Tox and any other packages
29+
run: pip install tox
30+
- name: Run Tox
31+
# Run tox using the version of Python in `PATH`
32+
run: tox -e py

CITATION.cff

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# This CITATION.cff file was generated with cffinit.
2+
# Visit https://bit.ly/cffinit to generate yours today!
3+
4+
cff-version: 1.2.0
5+
title: Drug named entity recognition
6+
message: 'If you use this software, please cite it as below.'
7+
type: software
8+
authors:
9+
- family-names: Wood
10+
given-names: Thomas Andrew
11+
orcid: 'https://orcid.org/0000-0001-8962-8571'
12+
repository-code: 'https://github.com/fastdatascience/country_named_entity_recognition/'
13+
url: 'https://fastdatascience.com/natural-language-processing/country-named-entity-recognition/'
14+
license: MIT
15+
version: CITATION.cff
16+
date-released: '2024-10-04'
17+
url: 'https://zenodo.org/doi/10.5281/zenodo.10970631'
18+
doi: 10.5281/zenodo.10970631

README.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,21 +126,51 @@ Thomas Wood at https://fastdatascience.com
126126

127127
We would be grateful for your taking the consideration to cite us. We would suggest something like the following (depending on your style):
128128

129-
Wood, T.A., Country Named Entity Recognition [Computer software], Version 0.4, accessed at https://fastdatascience.com/country-named-entity-recognition/, Fast Data Science Ltd (2022)
129+
Wood, T.A., Country Named Entity Recognition [Computer software], Version 1.0.0, accessed at https://fastdatascience.com/natural-language-processing/country-named-entity-recognition/, Fast Data Science Ltd (2022)
130130

131131
A BibTeX entry for LaTeX users is
132132

133133
```
134134
@unpublished{countrynamedentityrecognition,
135135
AUTHOR = {Wood, T.A.},
136-
TITLE = {Country Named Entity Recognition (Computer software), Version 0.4},
136+
TITLE = {Country Named Entity Recognition (Computer software), Version 1.0.0},
137137
YEAR = {2023},
138138
Note = {To appear},
139-
url = {https://fastdatascience.com/country-named-entity-recognition/}
139+
url = {https://fastdatascience.com/natural-language-processing/country-named-entity-recognition/}
140140
}
141141
142142
```
143143

144144
## Case studies of the Country Named Entity Recognition Library
145145

146-
Alisa Redding at the University of Helsinki used the tool for her Masters thesis on mass species extinction and biodiversity. Redding, Alisa, [Animals of the Digital Age : Assessing digital media for public interest and engagement in species threatened by wildlife trade.](https://helda.helsinki.fi/items/77960829-145a-4efb-b364-3dbe6ac6bfb4/full), University of Helsinki, Faculty of Science, 2023.
146+
People and organisations around the world have been using the library and have cited us.
147+
148+
### The sixth wave of mass species extinction...
149+
150+
Alisa Redding at the University of Helsinki used the tool for her Masters thesis on mass species extinction and biodiversity.
151+
152+
* Redding, Alisa. [Animals of the Digital Age: Assessing digital media for public interest and engagement in species threatened by wildlife trade.](https://helda.helsinki.fi/items/77960829-145a-4efb-b364-3dbe6ac6bfb4/full) University of Helsinki, Faculty of Science, 2023.
153+
154+
### The UN's Sustainable Development Goals (SDGs)
155+
156+
Christoph Funk and his colleagues at Justus-Liebig-Universität Gießen (Justus Liebig University Giessen) in Germany used country-named-entity-recognition for their meta-analysis of articles related to Sustainable Development Goals in 2023:
157+
158+
* Funk, Christoph and Tönjes, Elena and Teuber, Ramona and Breuer, Lutz, Reading Between the Lines: The Intersection of Research Attention and Sustainable Development Goals (May 31, 2023). Available at SSRN: [https://ssrn.com/abstract=4465055](https://ssrn.com/abstract=4465055) or [http://dx.doi.org/10.2139/ssrn.4465055](http://dx.doi.org/10.2139/ssrn.4465055)
159+
160+
### The European Commission: detecting terrorism and extremism
161+
162+
Francesco Bosso and his team at the European Commission wrote a report investigating NLP for location detection with a focus on the JRC Terrorism and Extremism Database.
163+
164+
* Bosso, Francesco, et al. [Use of Large Language Models for location detection on the example of the terrorism and extremism event database.](https://publications.jrc.ec.europa.eu/repository/bitstream/JRC134961/JRC134961_01.pdf), JRC Technical Report, European Commission (2023).
165+
166+
167+
### Labelling radical content online
168+
169+
Ugochukwu Etudo and Victoria Y. Yoon at Virginia Commonwealth University used the tool in their analysis of radical content online:
170+
171+
* Ugochukwu Etudo, Victoria Y. Yoon (2023) [Ontology-Based Information Extraction for Labeling Radical Online Content Using Distant Supervision](https://pubsonline.informs.org/doi/abs/10.1287/isre.2023.1223). Information Systems Research 0(0). [https://doi.org/10.1287/isre.2023.1223](https://doi.org/10.1287/isre.2023.1223)
172+
173+
174+
## Other named entity recognition tools
175+
176+
* [Medical and clinical named entity recognition Python library](https://fastdatascience.com/ai-in-pharma/medical-named-entity-recognition-python-library/)

README.rst

Lines changed: 0 additions & 127 deletions
This file was deleted.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "country-named-entity-recognition"
3-
version = "0.4"
3+
version = "1.0.0"
44
description = "Finds countries in a string"
55
readme = "README.md"
66
license = "MIT"

country_named_entity_recognition/__init__.py renamed to src/country_named_entity_recognition/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@
2727
2828
"""
2929

30+
__version__ = "1.0.0"
31+
3032
from country_named_entity_recognition.country_finder import find_countries

0 commit comments

Comments
 (0)