hankcs / HanLP

中文分词 词性标注 命名实体识别 依存句法分析 成分句法分析 语义依存分析 语义角色标注 指代消解 风格转换 语义相似度 新词发现 关键词短语提取 自动摘要 文本分类聚类 拼音简繁转换 自然语言处理
https://hanlp.hankcs.com/
Apache License 2.0
33.97k stars 10.18k forks source link

NER模型加载问题 #1878

Closed lotest closed 9 months ago

lotest commented 9 months ago

Describe the bug A clear and concise description of what the bug is.

Code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem.

import hanlp

HanLP = hanlp.load(hanlp.pretrained.ner.MSRA_NER_BERT_BASE_ZH)

result = HanLP(['2021年HanLPv2.1为生产环境带来次世代最先进的多语种NLP技术。', '阿婆主来到北京立方庭参观自然语义科技公司。'])

print(result)

Describe the current behavior

2024-02-27 10:35:41.821627: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: SSE SSE2 SSE3 SSE4.1 SSE4.2 AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Failed to load https://file.hankcs.com/hanlp/ner/ner_bert_base_msra_20211227_114712.zip
If the problem still persists, please submit an issue to https://github.com/hankcs/HanLP/issues
When reporting an issue, make sure to paste the FULL ERROR LOG below.
================================ERROR LOG BEGINS================================

Expected behavior A clear and concise description of what you expected to happen.

System information


OS: Windows-10-10.0.22621-SP0
Python: 3.9.0
PyTorch: 2.2.1+cpu
TensorFlow: 2.15.0
HanLP: 2.1.0-beta.56

Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

hankcs commented 9 months ago

When reporting an issue, make sure to paste the FULL ERROR LOG below.