{"id":13535214,"url":"https://github.com/yanwii/ChineseNER","last_synced_at":"2025-04-02T00:32:53.680Z","repository":{"id":38361127,"uuid":"146265855","full_name":"yanwii/ChineseNER","owner":"yanwii","description":" 基于Bi-GRU + CRF 的中文机构名、人名识别, 支持google bert模型","archived":false,"fork":false,"pushed_at":"2019-03-06T03:18:35.000Z","size":4294,"stargazers_count":164,"open_issues_count":10,"forks_count":42,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-08-02T08:10:00.032Z","etag":null,"topics":["bert-bilstm-crf","bert-chinese","bi-gru-crf","named-entity-recognition","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yanwii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-27T08:00:00.000Z","updated_at":"2024-06-02T14:01:00.000Z","dependencies_parsed_at":"2022-09-08T18:31:05.640Z","dependency_job_id":null,"html_url":"https://github.com/yanwii/ChineseNER","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/yanwii%2FChineseNER","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanwii%2FChineseNER/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanwii%2FChineseNER/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanwii%2FChineseNER/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yanwii","download_url":"https://codeload.github.com/yanwii/ChineseNER/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222788514,"owners_count":17037777,"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-bilstm-crf","bert-chinese","bi-gru-crf","named-entity-recognition","tensorflow"],"created_at":"2024-08-01T08:00:51.367Z","updated_at":"2024-11-02T23:31:01.058Z","avatar_url":"https://github.com/yanwii.png","language":"Python","funding_links":[],"categories":["BERT  NER  task:"],"sub_categories":[],"readme":"# Chinese NER\n\n基于Bi-GRU + CRF 的中文机构名、人名识别\n集成GOOGLE BERT模型\n\n# 下载bert模型\n     \n    wget -c https://storage.googleapis.com/bert_models/2018_11_03/chinese_L-12_H-768_A-12.zip\n\n放到根目录 **bert_model** 下\n\n# 用法\n\n    # 训练\n    # 使用bert模型\n    python3 model.py -e train -m bert\n    # 使用一般模型\n    python3 model.py -e train\n    \n    \n    # 预测\n    # 使用bert模型\n    python3 model.py -e predict -m bert\n    # 使用一般模型\n    python3 model.py -e predict\n\n# 介绍\n\n### bert 模型的加载和使用\n\n    def bert_layer(self):\n        # 加载bert配置文件\n        bert_config = modeling.BertConfig.from_json_file(ARGS.bert_config)\n\n        # 创建bert模型　\n        model = modeling.BertModel(\n            config=bert_config,\n            is_training=self.is_training,\n            input_ids=self.input_ids,\n            input_mask=self.input_mask,\n            token_type_ids=self.segment_ids,\n            use_one_hot_embeddings=False\n        )\n        # 加载词向量\n        self.embedded = model.get_sequence_output()\n        self.model_inputs = tf.nn.dropout(\n            self.embedded, self.dropout\n        )\n\n### bert 优化器\n\n    self.train_op = create_optimizer(\n        self.loss, self.learning_rate, num_train_steps, num_warmup_steps, False\n    )\n    \n\n\n\n# 例子\n    \u003e 金树良先生，董事，硕士。现任北方国际信托股份有限公司总经济师。曾任职于北京大学经济学院国际经济系。1992年7月起历任海南省证券公司副总裁、北京华宇世纪投资有限公司副总裁、昆仑证券有限责任公司总裁、北方国际信托股份有限公司资产管理部总经理及公司总经理助理兼资产管理部总经理、渤海财产保险股份有限公司常务副总经理及总经理、北方国际信托股份有限公司总经理助理。\n    \u003e   [\n            {\n              \"begin\": 14,\n              \"end\": 26,\n              \"entity\": \"北方国际信托股份有限公司\",\n              \"type\": \"ORG\"\n            },\n            {\n              \"begin\": 70,\n              \"end\": 82,\n              \"entity\": \"北京华宇世纪投资有限公司\",\n              \"type\": \"ORG\"\n            },\n            {\n              \"begin\": 99,\n              \"end\": 111,\n              \"entity\": \"北方国际信托股份有限公司\",\n              \"type\": \"ORG\"\n            },\n            {\n              \"begin\": 160,\n              \"end\": 172,\n              \"entity\": \"北方国际信托股份有限公司\",\n              \"type\": \"ORG\"\n            },\n            {\n              \"begin\": 0,\n              \"end\": 3,\n              \"entity\": \"金树良\",\n              \"type\": \"PER\"\n            }\n        ]","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanwii%2FChineseNER","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyanwii%2FChineseNER","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanwii%2FChineseNER/lists"}