中文文本分類

Chinese Text Classification

適用針對輸入文本(對話)進行分類以供進一步搜尋

curl -i -X POST \

-H "Content-Type:application/json" \

-d \

'{"message": ["洛杉磯的凌晨四點"]}' \

'http://Your_Server_IP/result'

Transformers: State-of-the-art Natural Language Processing for Pytorch and TensorFlow 2.0.

https://github.com/huggingface/transformers

BERT+BiLSTM+Attention

Epoch: 66

Training time: 1h 34m 33s

Accuracy: 0.9267

loss: 0.5153

Confusion matrix:

[[5162, 341],

[83, 202]]

BERT+TextCNN

Epoch: 175

Training time: 2h 18m 16s

Accuracy: 0.9155

loss: 0.9044

Confusion matrix:

[[5091, 412],

[77, 208]]

Tencent Embedding + BiGRU + Attention

Epoch: 17

Training time: 6h 1m 18s

Accuracy: 0.8944

loss: 0.5656

Confusion matrix:

[[4946, 557],

[54, 231]]

curl -i -X POST \

-H "Content-Type:application/json" \

-d \

'{"message":"帶我去麥當勞"}' \

'http://Your_Server_IP'