-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add documentation and uncomment all configurations
- Loading branch information
Showing
8 changed files
with
44 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.env | ||
.env* | ||
.idea | ||
.DS_store | ||
references | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,32 @@ | ||
## nerindo | ||
## Nerindo | ||
|
||
Named Entity Recognition for Indonesian NER with PyTorch. | ||
Named Entity Recognition for Bahasa Indonesia NER with PyTorch. | ||
|
||
Corpus for NER: | ||
* https://github.com/yohanesgultom/nlp-experiments | ||
* https://github.com/yusufsyaifudin/indonesia-ner | ||
* https://github.com/yusufsyaifudin/indonesia-ner | ||
|
||
The step-by-step implementation in Google Colab is indexed [here](https://medium.com/@yoseflaw/step-by-step-ner-model-for-bahasa-indonesia-with-pytorch-and-torchtext-6f94fca08406?source=friends_link&sk=c15c89082c00c8785577e1cebb77c9c2). | ||
|
||
The Fine-tuned Indonesian word embeddings `id_ft.bin` is available [here](https://drive.google.com/file/d/1BGWnSHGZXdPfVCCkvx3_ZbjNnKh2t9pF/view?usp=sharing), based on word embeddings trained in [indonesian-word-embedding](https://github.com/galuhsahid/indonesian-word-embedding). | ||
|
||
### Included configurations | ||
1. BiLSTM | ||
2. BiLSTM + Word Embeddings | ||
3. BiLSTM + Word Embeddings + Char Embeddings (CNN) | ||
4. BiLSTM + Word Embeddings + Char Embeddings (CNN) + Attention Layer | ||
5. Transformer (simplified BERT) + Word Embeddings + Char Embeddings (CNN) | ||
|
||
Automatic learning rate finder based on [pytorch-lr-finder](https://github.com/davidtvs/pytorch-lr-finder). | ||
|
||
### Example output for learning rate finder | ||
|
||
<img src="https://github.com/yoseflaw/nerindo/blob/master/images/lr_finder.png" alt="LR Finder Example Output"/> | ||
|
||
### Final result | ||
|
||
<img src="https://github.com/yoseflaw/nerindo/blob/master/images/final_result.png" alt="LR Finder Example Output"/> | ||
|
||
### Main reference | ||
|
||
Gunawan, W., Suhartono, D., Purnomo, F., & Ongko, A. (2018). Named-entity recognition for indonesian language using bidirectional lstm-cnns. Procedia Computer Science, 135, 425-432. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
|
||
import os | ||
from pprint import pprint | ||
from typing import List | ||
|
||
from spacy.lang.id import Indonesian | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
numpy==1.15.4 | ||
matplotlib | ||
scikit-learn==0.20.1 | ||
gensim==3.8.0 | ||
spacy==2.0.16 | ||
torch==1.5.1 | ||
torchtext==0.6.0 | ||
pytorch-crf==0.7.2 |