Jasminexjf / bert_senta

基于bert的情感分析(pytorch)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

基于BERT的情感分析模块。

基于别人的代码.

BERT参考:https://github.com/huggingface/pytorch-pretrained-BERT

pytorch-pretrained-BERT是一个基于Pytorch的封装好的BERT框架,使用其中的BertForSequenceClassification

训练:

数据格式:

每一个行为一个json字符串,json字符串内有labeltext字段。

label字段与train.py的MyPro.get_labels()对应。

数据格式:json list,每一个元素长度不超过120字符,超过后自动截断,list长度不超过32.

返回数据:json list,顺序对应请求的list顺序,包含labelscores字段

训练数据集来源:https://github.com/SophonPlus/ChineseNlpCorpus/blob/master/datasets/weibo_senti_100k/intro.ipynb

About

基于bert的情感分析(pytorch)


Languages

Language:Python 100.0%