像使用sklearn那样来使用bert进行中文文本分类、命名实体识别、句子相似度判别。数据和预训练语言模型下载地址:
链接:https://pan.baidu.com/s/1iUzWoMIzfIYblyTflETYnA
提取码:y3hb
不同的任务中都有训练验证和预测。要替换成自己的数据只需要将数据整理成实例所需的格式即可。
python text_classification.py
python named_entity_recognition.py
python text_pair_classification.py
https://github.com/CLUEbenchmark/CLUE
https://github.com/charles9n/bert-sklearn
huggingface pytorch-pretrained-BERT github