当前位置:   article > 正文

bert+lstm+crf ner实体识别_bert + crf 实体识别 tensorflow

bert + crf 实体识别 tensorflow

参考:
https://github.com/BrikerMan/Kashgari

https://eliyar.biz/nlp_chinese_text_classification_in_15mins/

bert预训练中文模型下载:百度云下载地址:https://pan.baidu.com/s/16JJp6NMCjmIT8PqP9OfN4g
包含这些内容的整体下载下来
在这里插入图片描述

!pip install kashgari

!pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow==1.14

from kashgari.corpus import ChineseDailyNerCorpus

train_x, train_y = ChineseDailyNerCorpus.load_data('train')
valid_x, valid_y = ChineseDailyNerCorpus.load_data('validate')
test_x, test_y  = ChineseDailyNerCorpus.load_data('test')


print(f"train data count: {len(train_x)}")
print(f"validate data count: {len(valid_x)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/570189
推荐阅读
相关标签
  

闽ICP备14008679号