---
title: nlp_xlmr_named-entity-recognition_indo-ecommerce-query
canonical_url: "https://www.modelscope.cn/models/iic/nlp_xlmr_named-entity-recognition_indo-ecommerce-query"
md_url: "https://www.modelscope.cn/models/iic/nlp_xlmr_named-entity-recognition_indo-ecommerce-query.md"
repository: iic/nlp_xlmr_named-entity-recognition_indo-ecommerce-query
chinese_name: "XLM-R命名实体识别-印尼语-电商领域(搜索query)-base"
last_updated: 2022-10-31
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:
  - id
domain:
  - nlp
downloads: 953
stars: 1
tags:
  - Alibaba
  - NER
  - "信息抽取"
---

# nlp_xlmr_named-entity-recognition_indo-ecommerce-query

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

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

- **Repository**: iic/nlp_xlmr_named-entity-recognition_indo-ecommerce-query
- **License**: Apache License 2.0
- **Tasks**: named-entity-recognition
- **Tags**: Alibaba, NER, 信息抽取
- **Downloads**: 953
- **Stars**: 1
- **Last updated**: 2022-10-31

Source: https://www.modelscope.cn/models/iic/nlp_xlmr_named-entity-recognition_indo-ecommerce-query

---

# 印尼语电商域Query NER介绍

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

## 训练数据介绍
- ecom-query-id: 内部印尼语电商领域搜索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_indo-ecommerce-query', model_revision='v1.0.1')
result = ner_pipeline('sarung hp naruto')

print(result)
#{'output': [{'type': 'product', 'start': 0, 'end': 9, 'span': 'sarung hp'}, {'type': 'pattern', 'start': 10, 'end': 16, 'span': 'naruto'}]}
```

## 性能评测

### 全局评测
| Precision | Recall | F1 |
| --- | --- | --- |
| 74.9 | 76.6 | 75.5 |


### 按实体类型评测
| 实体类型 | Precision | Recall | F1 |
| --- | --- | --- | --- |
| product | 78.35 | 79.95 | 79.14 |
| brand | 63.97 | 73.03 | 68.20 |
| pattern | 70.99 | 66.41 | 68.62 |
| color | 82.98 | 90.70 | 86.67|
| consumer_group | 94.03 | 93.56 | 93.80 |
| style | 70.00 | 74.47 | 72.16 |
