---
title: nlp_xlmr_word-segmentation_viet
canonical_url: "https://www.modelscope.cn/models/iic/nlp_xlmr_word-segmentation_viet"
md_url: "https://www.modelscope.cn/models/iic/nlp_xlmr_word-segmentation_viet.md"
repository: iic/nlp_xlmr_word-segmentation_viet
chinese_name: "XLM-R分词-越南语-通用领域-base"
last_updated: 2024-04-25
license: "Apache License 2.0"
pipeline_tag: word-segmentation
tasks:
  - word-segmentation
model_type:
  - xlm-roberta
architectures:
  - XLMRobertaForMaskedLM
library_name:
  - pytorch
frameworks:
  - pytorch
language:
  - vi
domain:
  - nlp
downloads: 359
stars: 0
tags:
  - "Vietnamese Word Segmentation"
  - Transformer
  - "越南语分词"
  - "分词"
---

# nlp_xlmr_word-segmentation_viet

> nlp_xlmr_word-segmentation_viet - iic 在 ModelScope 开源的模型。XLM-R分词-越南语-通用领域-base是基于VLSP数据训练得到的越南语分词模型，可根据用户输入的越南语文本产出分词结果。

iic/nlp_xlmr_word-segmentation_viet 是 ModelScope 魔搭社区上的word-segmentation模型，采用 Apache License 2.0 许可。

- **Repository**: iic/nlp_xlmr_word-segmentation_viet
- **License**: Apache License 2.0
- **Tasks**: word-segmentation
- **Tags**: Vietnamese Word Segmentation, Transformer, 越南语分词, 分词
- **Downloads**: 359
- **Stars**: 0
- **Last updated**: 2024-04-25

Source: https://www.modelscope.cn/models/iic/nlp_xlmr_word-segmentation_viet

---

# 越南语通用领域分词模型介绍

## 任务介绍
越南语分词是将空格分隔的越南语音节(syllable)合并为具有语言学意义的越南语单词的过程，是越南语文本理解的基础模块。需要注意的是，越南语单词可能包含一个或多个越南语音节。
- 输入: Nền kinh tế lúc ấy đang đứng trước nghịch lý : giá hàng tăng , sản xuất đình trệ , tiền khan hiếm ...
- 输出: Nền/ kinh tế/ lúc/ ấy/ đang/ đứng/ trước/ nghịch lý/ :/ giá/ hàng/ tăng/ ,/ sản xuất/ đình trệ/ ,/ tiền/ khan hiếm/ ...

## 模型介绍
- 本方法采用Transformer-Linear模型，使用XLM-RoBERTa(XLM-R)作为预训练模型底座。
- 对于输入文本，本模型按音节逐个预测当前音节是否为越南语单词边界, 具体调用方式请参考代码示例。

## 训练数据介绍
- [VLSP 2013](https://vlsp.org.vn/vlsp2013/eval/ws-pos) Word Segmentation

## 快速上手
### 适用范围
在安装ModelScope完成之后即可使用named-entity-recognition(命名实体识别)的能力, 默认单句包含音节(即，上文所述空格分隔的语义单元)数不超过512。

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

word_segmentation_pipeline = pipeline(Tasks.word_segmentation, 'damo/nlp_xlmr_word-segmentation_viet', model_revision='v1.0.0')
result = word_segmentation_pipeline('Nền kinh tế lúc ấy đang đứng trước nghịch lý : giá hàng tăng , sản xuất đình trệ , tiền khan hiếm ...')

print(result)
#{'output': ['Nền', 'kinh tế', 'lúc', 'ấy', 'đang', 'đứng', 'trước', 'nghịch lý', ':', 'giá', 'hàng', 'tăng', ',', 'sản xuất', 'đình trệ', ',', 'tiền', 'khan hiếm', '...'], 'labels': []}
```

## 性能评测
| Precision | Recall | F1 |
| --- | --- | --- |
| 98.0 | 98.3 | 98.1 |
