Ncov Sentiment Save

疫情期间网民情绪识别比赛baseline,使用BERT进行端到端的fine-tuning,datafountain平台,平台评测F1值0.716。

Project README

NCOV_Sentiment

NCOV_Sentiment Source Code

疫情期间网民情绪识别比赛baseline,使用BERT进行端到端的fine-tuning,平台评测F1值0.716。

很基础的基线,只用了labeled数据,没有利用unlabeled数据,没有调参。

Preinstallation

Before launch the script install these packages in your Python3 environment:

  • tensorflow 1.11

建议使用Conda安装 :)

 conda create -n tf1.11 python=3.6 tensorflow=1.11 tensorflow-gpu=1.11
 conda activate tf1.11

下载Bert中文模型至本地,并更改bert/run.sh中的BERT_BASE_DIR路径。

在datafountain平台上下载数据,解压至本地目录。将数据由gbk转为utf-8编码(vscode或linux shell的iconv命令)

运行数据预处理脚本dataprocess/data_process.py,将数据处理成bert的输入格式。(注意更改代码中的输出路径,并保持输出路径与bert/run.sh中的NCOV_DIR路径一致。

 python dataprocess/data_process.py

更改bert/run.sh中的OUTPUT_DIR路径为模型及结果输出路径。

Launch the script

环境配好,模型下好之后便可以运行代码了!

 bash bert/run.sh
Open Source Agenda is not affiliated with "Ncov Sentiment" Project. README Source: zhengyima/ncov_sentiment

Open Source Agenda Badge

Open Source Agenda Rating