dragonSwing / xlm-roberta-capu

huggingface.co
Total runs: 365
24-hour runs: 3
7-day runs: 47
30-day runs: 150
Model's Last Updated: January 31 2023
token-classification

Introduction of xlm-roberta-capu

Model Details of xlm-roberta-capu

✨ xlm-roberta-capitalization-punctuation

This a XLM-RoBERTa model finetuned for Vietnamese punctuation restoration on the OSCAR-2109 dataset. The model predicts the punctuation and upper-casing of plain, lower-cased text. An example use case can be ASR output. Or other cases when text has lost punctuation. This model is intended for direct use as a punctuation restoration model for the general Vietnamese language. Alternatively, you can use this for further fine-tuning on domain-specific texts for punctuation restoration tasks. Model restores the following punctuations -- [. , : ? ] The model also restores the complex upper-casing of words like YouTube , MobiFone .


🚋 Usage

Below is a quick way to get up and running with the model.

  1. Download files from hub
import os
import shutil
import sys
from huggingface_hub import snapshot_download
cache_dir = "./capu"
def download_files(repo_id, cache_dir=None, ignore_regex=None):
    download_dir = snapshot_download(repo_id=repo_id, cache_dir=cache_dir, ignore_regex=ignore_regex)
    if cache_dir is None or download_dir == cache_dir:
        return download_dir
    file_names = os.listdir(download_dir)
    for file_name in file_names:
        shutil.move(os.path.join(download_dir, file_name), cache_dir)
    os.rmdir(download_dir)
    return cache_dir
cache_dir = download_files(repo_id="dragonSwing/xlm-roberta-capu", cache_dir=cache_dir, ignore_regex=["*.json", "*.bin"])
sys.path.append(cache_dir)
  1. Sample python code
import os
from gec_model import GecBERTModel
model = GecBERTModel(
    vocab_path=os.path.join(cache_dir, "vocabulary"),
    model_paths="dragonSwing/xlm-roberta-capu",
    split_chunk=True
)
model("theo đó thủ tướng dự kiến tiếp bộ trưởng nông nghiệp mỹ tom wilsack bộ trưởng thương mại mỹ gina raimondo bộ trưởng tài chính janet yellen gặp gỡ thượng nghị sĩ patrick leahy và một số nghị sĩ mỹ khác")
# Always return list of outputs.
# ['Theo đó, Thủ tướng dự kiến tiếp Bộ trưởng Nông nghiệp Mỹ Tom Wilsack, Bộ trưởng Thương mại Mỹ Gina Raimondo, Bộ trưởng Tài chính Janet Yellen, gặp gỡ Thượng nghị sĩ Patrick Leahy và một số nghị sĩ Mỹ khác.']
model("những gói cước năm g mobifone sẽ mang đến cho bạn những trải nghiệm mới lạ trên cả tuyệt vời so với mạng bốn g thì tốc độ truy cập mạng 5 g mobifone được nhận định là siêu đỉnh với mức truy cập nhanh gấp 10 lần")
# ['Những gói cước 5G MobiFone sẽ mang đến cho bạn những trải nghiệm mới lạ trên cả tuyệt vời. So với mạng 4G thì tốc độ truy cập mạng 5G MobiFone được Nhận định là siêu đỉnh với mức truy cập nhanh gấp 10 lần.']

This model can work on arbitrarily large text in Vietnamese language.


📡 Training data

Here is the number of product reviews we used for fine-tuning the model:

Language Number of text samples
Vietnamese 5,600,000

🎯 Accuracy

Below is a breakdown of the performance of the model by each label on 10,000 held-out text samples:

label precision recall f1-score support
Upper 0.89 0.90 0.89 56497
Complex-Upper 0.93 0.83 0.88 480
. 0.81 0.84 0.82 18139
, 0.69 0.75 0.72 22961
: 0.76 0.60 0.67 1432
? 0.82 0.75 0.78 1730
none 0.99 0.99 0.99 475611

Runs of dragonSwing xlm-roberta-capu on huggingface.co

365
Total runs
3
24-hour runs
-5
3-day runs
47
7-day runs
150
30-day runs

More Information About xlm-roberta-capu huggingface.co Model

More xlm-roberta-capu license Visit here:

https://choosealicense.com/licenses/cc-by-sa-4.0

xlm-roberta-capu huggingface.co

xlm-roberta-capu huggingface.co is an AI model on huggingface.co that provides xlm-roberta-capu's model effect (), which can be used instantly with this dragonSwing xlm-roberta-capu model. huggingface.co supports a free trial of the xlm-roberta-capu model, and also provides paid use of the xlm-roberta-capu. Support call xlm-roberta-capu model through api, including Node.js, Python, http.

dragonSwing xlm-roberta-capu online free

xlm-roberta-capu huggingface.co is an online trial and call api platform, which integrates xlm-roberta-capu's modeling effects, including api services, and provides a free online trial of xlm-roberta-capu, you can try xlm-roberta-capu online for free by clicking the link below.

dragonSwing xlm-roberta-capu online free url in huggingface.co:

https://huggingface.co/dragonSwing/xlm-roberta-capu

xlm-roberta-capu install

xlm-roberta-capu is an open source model from GitHub that offers a free installation service, and any user can find xlm-roberta-capu on GitHub to install. At the same time, huggingface.co provides the effect of xlm-roberta-capu install, users can directly use xlm-roberta-capu installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

xlm-roberta-capu install url in huggingface.co:

https://huggingface.co/dragonSwing/xlm-roberta-capu

Url of xlm-roberta-capu

xlm-roberta-capu huggingface.co Url

Provider of xlm-roberta-capu huggingface.co

dragonSwing
ORGANIZATIONS

Other API from dragonSwing

huggingface.co

Total runs: 21
Run Growth: -2
Growth Rate: -9.52%
Updated:May 15 2022
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:March 31 2024