摘要: 1.调取URL base_url = "http:..." payload = { "entity_name": "123" } headers = {'Content-Type': 'application/json'} res = requests.post(base_url, json=pay 阅读全文
posted @ 2021-08-23 18:31 NTS100K 阅读(47) 评论(0) 推荐(0) 编辑
摘要: #读取ontonote4并转换格式 f=open("./data/ontonote4/train.char.bmes","r+",encoding="utf-8") sentences = [] sentence = [] label_set=set() cnt_line=0 for line in 阅读全文
posted @ 2021-03-31 17:16 NTS100K 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-03-25 19:33 NTS100K 阅读(45) 评论(0) 推荐(0) 编辑
摘要: 将BMES标记的NER语料库转换为BIO标记的语料库 读取 f = open("./data/msra/dev.char.bmes",encoding='utf-8') sentences = [] sentence = [] label_set=set() cnt_line=0 for line 阅读全文
posted @ 2021-03-16 15:10 NTS100K 阅读(597) 评论(0) 推荐(0) 编辑
摘要: 解决RuntimeError: CUDA error: out of memory 跑代码时出现这个错误,输入以下命令 $ nvidia-smi -l 原来是卡0内存爆了,于是指定相对空闲的2卡 CUDA_VISIBLE_DEVICES=2 python my_script.py 可以正常运行 阅读全文
posted @ 2021-03-11 21:12 NTS100K 阅读(1620) 评论(0) 推荐(0) 编辑
摘要: 没有告诉系统bert的具体路径,在代码中加入 import sys sys.path.append("E:/NER/bert") 解决之 阅读全文
posted @ 2021-03-08 18:29 NTS100K 阅读(862) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env bash export MAX_LENGTH=128 export BERT_MODEL=bert-base-cased export BATCH_SIZE=32 export NUM_EPOCHS=5 export SEED=1 export OUTPUT_DIR_N 阅读全文
posted @ 2021-03-08 17:14 NTS100K 阅读(60) 评论(0) 推荐(0) 编辑
摘要: def readfile(filename): ''' read file return format : [ ['EU', 'B-ORG'], ['rejects', 'O'], ['German', 'B-MISC'], ['call', 'O'], ['to', 'O'], ['boycott 阅读全文
posted @ 2021-03-05 16:12 NTS100K 阅读(84) 评论(0) 推荐(0) 编辑
摘要: A Lexicon-Based Graph Neural Network for Chinese NER 基于词汇的中文NER图神经网络 用于顺序命名字符和单词信息的中文命名实体识别(NER)的递归神经网络(RNN)取得了巨大的成功。 但是,链结构和缺乏全局语义的特征决定了基于RNN的模型容易受到单 阅读全文
posted @ 2021-02-22 20:54 NTS100K 阅读(506) 评论(0) 推荐(0) 编辑
摘要: Exploiting Multiple Embeddings for Chinese Named Entity Recognition 利用多个嵌入进行中文命名实体识别 代码:ME-CNER https://arxiv.org/pdf/1908.10657.pdf 识别文本中提到的命名实体将在下游级 阅读全文
posted @ 2021-02-22 20:52 NTS100K 阅读(292) 评论(0) 推荐(0) 编辑
浏览器标题切换end