---
title: nlp_xlmr_named-entity-recognition_eng-ecommerce-query
canonical_url: "https://www.modelscope.cn/models/damo/nlp_xlmr_named-entity-recognition_eng-ecommerce-query"
md_url: "https://www.modelscope.cn/models/damo/nlp_xlmr_named-entity-recognition_eng-ecommerce-query.md"
repository: damo/nlp_xlmr_named-entity-recognition_eng-ecommerce-query
chinese_name: "XLM-R命名实体识别-英语-电商领域(搜索query)-base"
last_updated: 2023-09-15
license: "Apache License 2.0"
pipeline_tag: named-entity-recognition
tasks:
  - named-entity-recognition
model_type:
  - xlm-roberta
architectures:
  - XLMRobertaForMaskedLM
library_name:
  - pytorch
frameworks:
  - PyTorch
language:
  - en
domain:
  - nlp
downloads: 81242
stars: 8
tags:
  - Alibaba
  - NER
  - "信息抽取"
---

# nlp_xlmr_named-entity-recognition_eng-ecommerce-query

> nlp_xlmr_named-entity-recognition_eng-ecommerce-query - damo 在 ModelScope 开源的模型。XLM-R命名实体识别-英语-电商领域(搜索query)-base是基于18K电商领域搜索query数据训练得到的英语命名实体识别模型，可根据用户输入的英语搜索query文本产出命名实体识别结果。

damo/nlp_xlmr_named-entity-recognition_eng-ecommerce-query 是 ModelScope 魔搭社区上的named-entity-recognition模型，采用 Apache License 2.0 许可。

- **Repository**: damo/nlp_xlmr_named-entity-recognition_eng-ecommerce-query
- **License**: Apache License 2.0
- **Tasks**: named-entity-recognition
- **Tags**: Alibaba, NER, 信息抽取
- **Downloads**: 81242
- **Stars**: 8
- **Last updated**: 2023-09-15

Source: https://www.modelscope.cn/models/damo/nlp_xlmr_named-entity-recognition_eng-ecommerce-query

---

# 英语电商域Query NER介绍

## 模型描述
本方法采用Transformer-CRF模型，使用XLM-RoBERTa(XLM-R)作为预训练模型底座。本模型主要用于给输入英语搜索query文本产出命名实体识别结果, 具体调用方式请参考代码示例。

## 训练数据介绍
- ecom-query-en: 内部英语电商领域搜索query命名实体识别(NER)数据集, 支持产品(product), 功能(function), 品牌(brand), 模式(pattern), 颜色(color), 用户群体(consumer_group), 风格(style)等七大类型的实体识别

| 实体类型 | 英文名 |
|----------|------|
| 产品 | product |
| 功能 | function |
| 品牌 | brand |
| 图案 | pattern |
| 颜色 | color |
| 用户群体 | consumer_group |
| 风格 | style |

## 快速上手
### 适用范围
在安装ModelScope完成之后即可使用named-entity-recognition(命名实体识别)的能力, 默认单句长度不超过512, 推荐输入长度不超过128的句子。

### 代码示例
```python
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks

ner_pipeline = pipeline(Tasks.named_entity_recognition, 'damo/nlp_xlmr_named-entity-recognition_eng-ecommerce-query', model_revision='v1.0.0')
result = ner_pipeline('x mini me speaker')

print(result)
#{'output': [{'type': 'brand', 'start': 0, 'end': 6, 'span': 'x mini'}, {'type': 'product', 'start': 10, 'end': 17, 'span': 'speaker'}]}
```

## 性能评测

### 全局评测
| Precision | Recall | F1 |
| --- | --- | --- |
| 74.6 | 76.8 | 75.7 |


### 按实体类型评测
| 实体类型 | Precision | Recall | F1 |
| --- | --- | --- | --- |
| product | 75.54 | 80.69 | 78.03 |
| brand | 75.17 | 76.06 | 75.61 |
| pattern | 70.78 | 62.75 | 66.52 |
| color | 76.60 | 90.00 | 82.76 |
| consumer_group | 90.62 | 90.62 | 90.62 |
| style | 82.76 | 77.42 | 80.00 |
| function | 62.06 | 62.55 | 62.30 |
