Official repository for Automatic Prediction and Linguistic Interpretation of Chinese Directional Complements(趋向补语) Based on BERT Model at Chinese Lexical Semantics Workshop 2021
- Authors: Younghoon Jeong, Ming Yue Li, Su Min Kang, Yun Kyung Eum, Byeong Kwu Kang
- This code is reimplementation of original code
conda create -f environment.yaml
conda activate soc_env
./scripts/run_train_buyu.sh {gpu_id}
- Automatically trains four 补语 classifiers (下去,下来,出来,起来)
- You can change hyperparameters from script
./scripts/run_explain_buyu.sh {gpu_id}
runs explanation with the test
data
--output_dir
: directory of classifier model--lm_dir
: directory of language model (different with classifier)--nb_range
: window size to sample n--sample_n
: number of sentences to sample--hiex
: hierarchical explanation (default : sequential explanation)--output_filename
: name of the explanation file
explanation result is saved in output_dir
`./scripts/run_visualize_buyu.sh``
--input_file
: file dir to visualize (*.txt, *.heix)--buyu
: buyu #--hiex
: true if hierarchical explanation
Example of Sequencial Explanation
Example of Hierarchical Explanation
|----data/buyu
|----|----train.json
|----|----dev.json
|----|----test.json
Binary label
loader/*.py
- modfiy
class *Processor
@inproceedings{kennedy2020contextualizing,
author = {Kennedy*, Brendan and Jin*, Xisen and Mostafazadeh Davani, Aida and Dehghani, Morteza and Ren, Xiang},
title = {Contextualizing {H}ate {S}peech {C}lassifiers with {P}ost-hoc {E}xplanation},
year = {to appear},
booktitle = {Proceedings of the 58th {A}nnual {M}eeting of the {A}ssociation for {C}omputational {L}inguistics}
}