Skip to content

taeminlee/intent_classifier

Repository files navigation

intent_classifier

Korean Intention classifier with pytorch lightning ⚡

About

This is an intention classifier that was learned using 3i4k dataset to identify the intonation intention of Korean.

  • implemented using phytorch lighting. ⚡
  • trained based on Transformers' distil-KoBERT PLM and has approx. 90% accuracy.
  • use it as a web API powerd by flask-restplus.

Installation

  • clone
  • pip install -r requirements.txt
  • download model file
  • copy into /model/intent_distilkobert.ckpt

Train

  • bash train_distil.sh to use distil-KoBERT model

  • bash train.sh to use KoBERT model

Inference

  • python app.py to start web server
  • open {SERVER_IP}:41063 in web browser
  • using swagger UI to try out

  • response types
    • FRAG : Fragments
    • STAT : Statements
    • QUES : Questions
    • COMM : Commands
    • RHEQ : rhetorical questions
    • RHEC : rhetorical commands
    • INTO : Intonation-dependent utterances

References