---
title: nlp_xlmr_named-entity-recognition_viet-ecommerce-query
canonical_url: "https://www.modelscope.cn/models/iic/nlp_xlmr_named-entity-recognition_viet-ecommerce-query"
md_url: "https://www.modelscope.cn/models/iic/nlp_xlmr_named-entity-recognition_viet-ecommerce-query.md"
repository: iic/nlp_xlmr_named-entity-recognition_viet-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:
  - vi
domain:
  - nlp
downloads: 801
stars: 1
tags:
  - Alibaba
  - NER
  - "信息抽取"
---

# nlp_xlmr_named-entity-recognition_viet-ecommerce-query

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

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

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

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

---

# 越南语电商域Query NER介绍

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

## 训练数据介绍
- ecom-query-vi: 内部越南语电商领域搜索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_viet-ecommerce-query', model_revision='v1.0.1')
result = ner_pipeline('quần áo cổ trang cho búp bê')

print(result)
#{'output': [{'type': 'product', 'start': 0, 'end': 7, 'span': 'quần áo'}, {'type': 'style', 'start': 8, 'end': 16, 'span': 'cổ trang'}, {'type': 'function', 'start': 21, 'end': 27, 'span': 'búp bê'}]}
```

## 性能评测

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


### 按实体类型评测
| 实体类型 | Precision | Recall | F1 |
| --- | --- | --- | --- |
| product | 76.88 | 78.60 | 77.73 |
| function | 60.62 | 61.43 | 61.02 |
| brand | 69.21 | 74.92 | 71.95 |
| pattern | 68.65 | 67.58 | 68.11 |
| color | 90.91 | 80.00 | 85.11 |
| consumer_group | 92.02 | 93.01 | 92.51 |
| style | 68.09 | 65.31 | 66.67 |
