{"id":13535193,"url":"https://github.com/ProHiryu/bert-chinese-ner","last_synced_at":"2025-04-02T00:32:53.090Z","repository":{"id":43212177,"uuid":"159430135","full_name":"ProHiryu/bert-chinese-ner","owner":"ProHiryu","description":"使用预训练语言模型BERT做中文NER","archived":false,"fork":false,"pushed_at":"2020-02-26T05:58:03.000Z","size":3821,"stargazers_count":927,"open_issues_count":2,"forks_count":276,"subscribers_count":26,"default_branch":"master","last_synced_at":"2024-11-02T23:32:37.192Z","etag":null,"topics":["bert","chinese","fine-tune","ner","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ProHiryu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-28T02:18:54.000Z","updated_at":"2024-09-20T07:30:21.000Z","dependencies_parsed_at":"2022-09-10T03:11:55.869Z","dependency_job_id":null,"html_url":"https://github.com/ProHiryu/bert-chinese-ner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProHiryu%2Fbert-chinese-ner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProHiryu%2Fbert-chinese-ner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProHiryu%2Fbert-chinese-ner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProHiryu%2Fbert-chinese-ner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ProHiryu","download_url":"https://codeload.github.com/ProHiryu/bert-chinese-ner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246735355,"owners_count":20825221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bert","chinese","fine-tune","ner","tensorflow"],"created_at":"2024-08-01T08:00:51.041Z","updated_at":"2025-04-02T00:32:51.514Z","avatar_url":"https://github.com/ProHiryu.png","language":"Python","funding_links":[],"categories":["BERT  NER  task:","Tasks","Chinese NLP Toolkits 中文NLP工具"],"sub_categories":["Named-Entity Recognition (NER)","Information Extraction 信息提取"],"readme":"# bert-chinese-ner\n\n## 前言\n\n使用预训练语言模型BERT做中文NER尝试，fine - tune BERT模型\n\nPS: 移步最新[**albert fine-tune ner**](https://github.com/ProHiryu/albert-chinese-ner)模型\n\n## 代码参考\n\n- [BERT-NER](https://github.com/kyzhouhzau/BERT-NER)\n- [BERT-TF](https://github.com/google-research/bert)\n\n## 使用方法\n\n从[BERT-TF](https://github.com/google-research/bert)下载bert源代码，存放在路径下bert文件夹中\n\n从[BERT-Base Chinese](https://storage.googleapis.com/bert_models/2018_11_03/chinese_L-12_H-768_A-12.zip)下载模型，存放在checkpoint文件夹下\n\n使用BIO数据标注模式，使用人民日报经典数据\n\ntrain：\n\n`python BERT_NER.py --data_dir=data/ --bert_config_file=checkpoint/bert_config.json --init_checkpoint=checkpoint/bert_model.ckpt --vocab_file=vocab.txt --output_dir=./output/result_dir/`\n\n## 结果\n\n经过100个epoch跑出来的结果\n\n```\neval_f = 0.9662649\neval_precision = 0.9668882\neval_recall = 0.9656949\nglobal_step = 135181\nloss = 40.160034\n```\n\n测试结果第一句：\n\n![](test.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FProHiryu%2Fbert-chinese-ner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FProHiryu%2Fbert-chinese-ner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FProHiryu%2Fbert-chinese-ner/lists"}