Skip to content

Commit 47008bb

Browse files
adolphk-ykljshou
authored andcommitted
Modify sequence labeling tutorial (#69)
* add sequence labeling in tutorial * add tag scheme convert script * add paper link * modify sequence labeling tutorial * modify senquence labeling tutorial
1 parent 3f69dac commit 47008bb

File tree

2 files changed

+50
-6
lines changed

2 files changed

+50
-6
lines changed

Tutorial.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -578,20 +578,42 @@ Sequence Labeling is an important NLP task, which includes NER, Slot Tagging, Po
578578
579579
- ***Usages***
580580
581-
1. BiLSTM representation and Softmax output.
581+
1. Softmax output.
582582
```bash
583+
# train model
583584
cd PROJECT_ROOT
584585
python train.py --conf_path=model_zoo/nlp_tasks/slot_tagging/conf_slot_tagging.json
586+
587+
# test model
588+
cd PROJECT_ROOT
589+
python test.py --conf_path=model_zoo/nlp_tasks/slot_tagging/conf_slot_tagging.json
585590
```
591+
2. CRF output.
592+
```bash
593+
# train model
594+
cd PROJECT_ROOT
595+
python train.py --conf_path=model_zoo/nlp_tasks/slot_tagging/conf_slot_tagging_ccnn_wlstm_crf.json
596+
597+
# test model
598+
cd PROJECT_ROOT
599+
python test.py --conf_path=model_zoo/nlp_tasks/slot_tagging/conf_slot_tagging_ccnn_wlstm_crf.json
600+
```
601+
*Tips: you can try more model in [here](https://github.com/microsoft/NeuronBlocks/tree/master/model_zoo/nlp_tasks/slot_tagging).*
586602
587603
- ***Result***
588604
589-
1. BiLSTM representation and Softmax output.
605+
The result on CoNLL 2003 English NER dataset.
590606
591607
Model | F1-score
592608
-------- | --------
593609
[Ma and Hovy(2016)](https://arxiv.org/pdf/1603.01354.pdf)|87.00
594-
BiLSTM+Softmax(NeuronBlocks)|88.50
610+
[BiLSTM+Softmax](https://github.com/microsoft/NeuronBlocks/blob/master/model_zoo/nlp_tasks/slot_tagging/conf_slot_tagging.json) (NeuronBlocks)|88.50
611+
[Lample et al.(2016)](https://arxiv.org/pdf/1603.01360.pdf)| 89.15
612+
[CLSTM+WLSTM+CRF](https://github.com/microsoft/NeuronBlocks/blob/master/model_zoo/nlp_tasks/slot_tagging/conf_slot_tagging_clstm_wlstm_crf.json) (NeuronBlocks)|90.83
613+
[Chiu and Nichols(2016)](https://www.mitpressjournals.org/doi/pdf/10.1162/tacl_a_00104)|90.91
614+
[CCNN+WLSTM+CRF](https://github.com/microsoft/NeuronBlocks/blob/master/model_zoo/nlp_tasks/slot_tagging/conf_slot_tagging_ccnn_wlstm_crf.json) (NeuronBlocks)|91.38
615+
616+
*Tips: C means Char and W means Word. CCNN means Char-level representation with CNN model and CLSTM means Char-level representation with LSTM model.*
595617
596618
## <span id="advanced-usage">Advanced Usage</span>
597619

Tutorial_zh_CN.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -568,20 +568,42 @@ This task is to train a query-passage regression model to learn from a heavy tea
568568
569569
- ***用法***
570570
571-
1. BiLSTM 词表示和 Softmax 输出
571+
1. Softmax 输出.
572572
```bash
573+
# train model
573574
cd PROJECT_ROOT
574575
python train.py --conf_path=model_zoo/nlp_tasks/slot_tagging/conf_slot_tagging.json
576+
577+
# test model
578+
cd PROJECT_ROOT
579+
python test.py --conf_path=model_zoo/nlp_tasks/slot_tagging/conf_slot_tagging.json
575580
```
581+
2. CRF 输出.
582+
```bash
583+
# train model
584+
cd PROJECT_ROOT
585+
python train.py --conf_path=model_zoo/nlp_tasks/slot_tagging/conf_slot_tagging_ccnn_wlstm_crf.json
586+
587+
# test model
588+
cd PROJECT_ROOT
589+
python test.py --conf_path=model_zoo/nlp_tasks/slot_tagging/conf_slot_tagging_ccnn_wlstm_crf.json
590+
```
591+
*提示 :尝试更多模型可 [点击](https://github.com/microsoft/NeuronBlocks/tree/master/model_zoo/nlp_tasks/slot_tagging)。*
576592
577593
- ***结果***
578594
579-
1. BiLSTM 词表示和 Softmax 输出
595+
实验采用 CoNLL 2003 英文 NER 数据集。
580596
581597
Model | F1-score
582598
-------- | --------
583599
[Ma and Hovy(2016)](https://arxiv.org/pdf/1603.01354.pdf)|87.00
584-
BiLSTM+Softmax(NeuronBlocks)|88.50
600+
[BiLSTM+Softmax](https://github.com/microsoft/NeuronBlocks/blob/master/model_zoo/nlp_tasks/slot_tagging/conf_slot_tagging.json) (NeuronBlocks)|88.50
601+
[Lample et al.(2016)](https://arxiv.org/pdf/1603.01360.pdf)| 89.15
602+
[CLSTM+WLSTM+CRF](https://github.com/microsoft/NeuronBlocks/blob/master/model_zoo/nlp_tasks/slot_tagging/conf_slot_tagging_clstm_wlstm_crf.json) (NeuronBlocks)|90.83
603+
[Chiu and Nichols(2016)](https://www.mitpressjournals.org/doi/pdf/10.1162/tacl_a_00104)|90.91
604+
[CCNN+WLSTM+CRF](https://github.com/microsoft/NeuronBlocks/blob/master/model_zoo/nlp_tasks/slot_tagging/conf_slot_tagging_ccnn_wlstm_crf.json) (NeuronBlocks)|91.38
605+
606+
*提示 : C 代表字符,W 代表单词。 CCNN 代表使用 CNN 模型的字符级别表示, CLSTM 代表使用 LSTM 模型的字符级别表示。*
585607
586608
## <span id="advanced-usage">高阶用法</span>
587609

0 commit comments

Comments
 (0)