Skip to content

NER Task with HanBert (with Naver NLP Challenge dataset)

License

Notifications You must be signed in to change notification settings

forus-ai/HanBert-NER

Repository files navigation

HanBert-NER

  • HanBert 이용한 한국어 Named Entity Recognition Task
  • 🤗Huggingface Tranformers🤗 라이브러리를 이용하여 구현

Dependencies

  • torch==1.4.0
  • transformers==2.7.0
  • seqeval==0.0.12

Dataset

  • Naver NLP Challenge 2018의 NER Dataset 사용 (Github link)
  • 해당 데이터셋에 Train dataset만 존재하기에, Test dataset은 Train dataset에서 split하였습니다. (Data link)
    • Train (81,000) / Test (9,000)

Details

기본적인 사용법은 HanBert-Transformers를 참고

Prerequisite

Usage

$ python3 main.py --model_type hanbert \
                  --model_name_or_path HanBert-54kN-torch\
                  --do_train \
                  --do_eval

$ python3 main.py --model_type hanbert \
                  --model_name_or_path HanBert-54kN-IP-torch\
                  --do_train \
                  --do_eval

Prediction

$ python3 predict.py --input_file {INPUT_FILE_PATH} --output_file {OUTPUT_FILE_PATH} --model_dir {SAVED_CKPT_PATH}

Results

Hyperparameter는 main.py에 있는 것을 그대로 사용하였습니다

Slot F1 (%)
HanBert-54kN 87.31
HanBert-54kN-IP 86.57
KoBERT 86.11
DistilKoBERT 84.13
Bert-Multilingual 84.20
BiLSTM-CRF 74.57

References

About

NER Task with HanBert (with Naver NLP Challenge dataset)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages