Pytorch implement of "Character-based BiLSTM-CRF Incorporating POS and Dictionaries for Chinese Opinion Target Extraction", ACML2018 [paper, pdf]
While this implement might work for many cases, it is only tested for environment below:
python == 3.6.8
torch == 1.1.0
thulac == 0.2.0
tqdm
keras == 2.3.0
numpy == 1.17.0
numba
- Install dependency
- Download dataset from this repo, move files into
./dataset
folder, then unzipdictionary.zip
. - Train model:
python3 main.py --mode=train --dataset=baidu
- Test model:
python3 main.py --mode=test --dataset=baidu
Note: It would cost about 10~20 minutes for pre-processing.
Baidu | Mafengwo | Dianping | |
---|---|---|---|
P | 85.791 | 83.273 | 83.753 |
R | 82.531 | 89.989 | 85.672 |
F1 | 84.130 | 86.501 | 84.702 |
If you find this work is useful in your research, please consider citing:
@inproceedings{li2018character,
title={Character-based BiLSTM-CRF Incorporating POS and Dictionaries for Chinese Opinion Target Extraction},
author={Li, Yanzeng and Liu, Tingwen and Li, Diying and Li, Quangang and Shi, Jinqiao and Wang, Yanqiu},
booktitle={Asian Conference on Machine Learning},
pages={518--533},
year={2018}
}