---
title: hwtcmner
canonical_url: "https://www.modelscope.cn/models/huangxp/hwtcmner"
md_url: "https://www.modelscope.cn/models/huangxp/hwtcmner.md"
repository: huangxp/hwtcmner
chinese_name: "传统中医NER"
last_updated: 2025-03-05
license: apache-2.0
pipeline_tag: named-entity-recognition
tasks:
  - named-entity-recognition
model_type:
  - roberta
architectures:
  - RobertaForTokenClassification
library_name:
  - transformer
  - pytorch
frameworks:
  - PyTorch
language:
  - zh
downloads: 130
stars: 4
tags:
  - NER
  - TCM
  - "Traditional Chinese Medicine"
  - medical
---

# hwtcmner

> hwtcmner - huangxp 在 ModelScope 开源的模型。一个基于BERT的中医NER模型，包括识别方剂、本草、来源、病名、症状、证型的识别.

huangxp/hwtcmner 是 ModelScope 魔搭社区上的named-entity-recognition模型，采用 apache-2.0 许可。

- **Repository**: huangxp/hwtcmner
- **License**: apache-2.0
- **Tasks**: named-entity-recognition
- **Tags**: NER, TCM, Traditional Chinese Medicine, medical
- **Downloads**: 130
- **Stars**: 4
- **Last updated**: 2025-03-05

Source: https://www.modelscope.cn/models/huangxp/hwtcmner

---

# 模型描述

一个基于BERT的中医NER模型，包括识别方剂、本草、来源、病名、症状、证型的识别.

# 如何使用


```
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline

tokenizer = AutoTokenizer.from_pretrained("Monor/TCMNER")
model = AutoModelForTokenClassification.from_pretrained("Monor/TCMNER")

nlp = pipeline("ner", model=model, tokenizer=tokenizer)
example = "化滞汤,出处：《证治汇补》卷八。。组成：青皮20g，陈皮20g，厚朴20g，枳实20g，黄芩20g，黄连20g，当归20g，芍药20g，木香5g，槟榔8g，滑石3g，甘草4g。。主治：下痢因于食积气滞者。"

ner_results = nlp(example)
print(ner_results)
```

## 标签


标签|描述
-|-
O|Other
B-方剂 |方剂
I-方剂 |方剂
B-本草 |本草
I-本草 |本草
B-来源 |来源
I-来源 |来源
B-病名 |病名
I-病名 |病名 
B-症状 |症状
I-症状 |症状
B-证型 |证型
I-证型 |证型

# 性能指标

![alt text](images/iShot_2024-06-07_18.03.00.png "Title")



# 硬广

[我](https://github.com/huangxinping)  
[我们](https://zhongyigen.com)
