Home

Awesome

Chinese Opinion Target Extraction

Pytorch implement of "Character-based BiLSTM-CRF Incorporating POS and Dictionaries for Chinese Opinion Target Extraction", ACML2018 [paper, pdf]

Dependency

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

Usage

  1. Install dependency
  2. Download dataset from this repo, move files into ./dataset folder, then unzip dictionary.zip.
  3. Train model: python3 main.py --mode=train --dataset=baidu
  4. Test model: python3 main.py --mode=test --dataset=baidu

Note: It would cost about 10~20 minutes for pre-processing.

Architecture

<div align=center> <img src="./images/architecture.png" width="500px" /> </div>

Results

BaiduMafengwoDianping
P85.79183.27383.753
R82.53189.98985.672
F184.13086.50184.702

Citation

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}
}