dragonSwing / vibert-capu

huggingface.co
Total runs: 406
24-hour runs: 14
7-day runs: -91
30-day runs: -128
Model's Last Updated: April 07 2023
token-classification

Introduction of vibert-capu

Model Details of vibert-capu

✨ vibert-capitalization-punctuation

This a viBERT model finetuned for 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/vibert-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/vibert-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.88 0.89 0.89 56497
Complex-Upper 0.92 0.83 0.88 480
. 0.81 0.82 0.82 18139
, 0.73 0.70 0.71 22961
: 0.74 0.56 0.64 1432
? 0.80 0.76 0.78 1730
none 0.99 0.99 0.99 475611

Runs of dragonSwing vibert-capu on huggingface.co

406
Total runs
14
24-hour runs
-118
3-day runs
-91
7-day runs
-128
30-day runs

More Information About vibert-capu huggingface.co Model

More vibert-capu license Visit here:

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

vibert-capu huggingface.co

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

dragonSwing vibert-capu online free

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

dragonSwing vibert-capu online free url in huggingface.co:

https://huggingface.co/dragonSwing/vibert-capu

vibert-capu install

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

vibert-capu install url in huggingface.co:

https://huggingface.co/dragonSwing/vibert-capu

Url of vibert-capu

Provider of vibert-capu huggingface.co

dragonSwing
ORGANIZATIONS

Other API from dragonSwing

huggingface.co

Total runs: 12
Run Growth: -6
Growth Rate: -50.00%
Updated:May 15 2022
huggingface.co

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