Skip to content

Commit 845af37

Browse files
committed
added code for ner task
1 parent 0729dbc commit 845af37

14 files changed

+2148499
-2
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
venv
2+
.ipynb_checkpoints
3+
models/
4+
.idea

README.md

+51-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,51 @@
1-
# blog-nlp
2-
This is repository for nlp tasks related nlp articles on tech blog
1+
# Blog NLP
2+
3+
In this repository are present some jupyter notebooks and scripts related about Tech Blog Natural
4+
Language Processing articles series.
5+
6+
## Repository Organization
7+
8+
This repository is organized in multiple folders. Every folder is related to specific article in Smc Tech Blog.
9+
10+
* [1-ner](1-ner): contains code related to Named Entity Recognition article
11+
* [2-text-classification](): coming soon
12+
* [3-topic-modeling](): coming soon
13+
* [4-entity-linking](): coming soon
14+
* [5-machine-translation](): coming soon
15+
16+
## Execution in Docker Environment
17+
18+
All code is executable in Docker environment. There is a Docker Compose file that build an image based
19+
on Tensorflow with Jupyter Notebook integrated. (See Dockerfile inside nlp folder)
20+
The image contains also some default notebooks provided by tensorflow for some simple tutorials.
21+
Inside nlp folder are presente the directiories for every task based on repository organization.
22+
23+
To build and run the container execute:
24+
25+
```shell
26+
docker-compose up -d
27+
```
28+
29+
You can see logs of servive typing:
30+
31+
```shell
32+
docker-compose logs -f nlp
33+
```
34+
35+
36+
To rebuild image type:
37+
38+
```shell
39+
docker-compose build
40+
```
41+
42+
To stop container run:
43+
44+
```shell
45+
docker-compose down
46+
```
47+
48+
The nlp directory is binded as external volumes, so all changes in notebooks inside container
49+
are saved.
50+
51+

docker-compose.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: '3.5'
2+
services:
3+
nlp:
4+
container_name: nlp
5+
build:
6+
dockerfile: nlp/Dockerfile
7+
context: .
8+
volumes:
9+
- ./nlp:/tf/nlp
10+
ports:
11+
- '8888:8888'
12+
- '5000:5000'

nlp/1-ner/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Blog NLP
2+
3+
In this directory is present related to [Tech Blog Named Entity Recognition article]()
4+
5+
## Repository Organization
6+
7+
There are three folders:
8+
9+
* [notebooks](notebooks): container jupyter notebooks to train ner model with Spacy and Tensoflow Keras
10+
* [data](data): contains data to train models in BILUO, IOB and JSONL format. Contains also notebooks with code
11+
to transform data from one format to another
12+
* [models](models): is used to save trained models

0 commit comments

Comments
 (0)