RUPunct / RUPunct_big

huggingface.co
Total runs: 49.5K
24-hour runs: 1.3K
7-day runs: -5.4K
30-day runs: 11.2K
Model's Last Updated: May 01 2024
token-classification

Introduction of RUPunct_big

Model Details of RUPunct_big

RUPunct_big - самая большая модель из семейства RUPunct. Подходит для большинства задач.

Код инференса:

from transformers import pipeline
from transformers import AutoTokenizer

pt = "RUPunct/RUPunct_big"

tk = AutoTokenizer.from_pretrained(pt, strip_accents=False, add_prefix_space=True)
classifier = pipeline("ner", model=pt, tokenizer=tk, aggregation_strategy="first")


def process_token(token, label):
    if label == "LOWER_O":
        return token
    if label == "LOWER_PERIOD":
        return token + "."
    if label == "LOWER_COMMA":
        return token + ","
    if label == "LOWER_QUESTION":
        return token + "?"
    if label == "LOWER_TIRE":
        return token + "—"
    if label == "LOWER_DVOETOCHIE":
        return token + ":"
    if label == "LOWER_VOSKL":
        return token + "!"
    if label == "LOWER_PERIODCOMMA":
        return token + ";"
    if label == "LOWER_DEFIS":
        return token + "-"
    if label == "LOWER_MNOGOTOCHIE":
        return token + "..."
    if label == "LOWER_QUESTIONVOSKL":
        return token + "?!"
    if label == "UPPER_O":
        return token.capitalize()
    if label == "UPPER_PERIOD":
        return token.capitalize() + "."
    if label == "UPPER_COMMA":
        return token.capitalize() + ","
    if label == "UPPER_QUESTION":
        return token.capitalize() + "?"
    if label == "UPPER_TIRE":
        return token.capitalize() + " —"
    if label == "UPPER_DVOETOCHIE":
        return token.capitalize() + ":"
    if label == "UPPER_VOSKL":
        return token.capitalize() + "!"
    if label == "UPPER_PERIODCOMMA":
        return token.capitalize() + ";"
    if label == "UPPER_DEFIS":
        return token.capitalize() + "-"
    if label == "UPPER_MNOGOTOCHIE":
        return token.capitalize() + "..."
    if label == "UPPER_QUESTIONVOSKL":
        return token.capitalize() + "?!"
    if label == "UPPER_TOTAL_O":
        return token.upper()
    if label == "UPPER_TOTAL_PERIOD":
        return token.upper() + "."
    if label == "UPPER_TOTAL_COMMA":
        return token.upper() + ","
    if label == "UPPER_TOTAL_QUESTION":
        return token.upper() + "?"
    if label == "UPPER_TOTAL_TIRE":
        return token.upper() + " —"
    if label == "UPPER_TOTAL_DVOETOCHIE":
        return token.upper() + ":"
    if label == "UPPER_TOTAL_VOSKL":
        return token.upper() + "!"
    if label == "UPPER_TOTAL_PERIODCOMMA":
        return token.upper() + ";"
    if label == "UPPER_TOTAL_DEFIS":
        return token.upper() + "-"
    if label == "UPPER_TOTAL_MNOGOTOCHIE":
        return token.upper() + "..."
    if label == "UPPER_TOTAL_QUESTIONVOSKL":
        return token.upper() + "?!"

while 1:
    input_text = input(":> ")
    preds = classifier(input_text)
    output = ""
    for item in preds:
        output += " " + process_token(item['word'].strip(), item['entity_group'])
    print(">>>", output)

Runs of RUPunct RUPunct_big on huggingface.co

49.5K
Total runs
1.3K
24-hour runs
-810
3-day runs
-5.4K
7-day runs
11.2K
30-day runs

More Information About RUPunct_big huggingface.co Model

More RUPunct_big license Visit here:

https://choosealicense.com/licenses/mit

RUPunct_big huggingface.co

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

RUPunct_big huggingface.co Url

https://huggingface.co/RUPunct/RUPunct_big

RUPunct RUPunct_big online free

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

RUPunct RUPunct_big online free url in huggingface.co:

https://huggingface.co/RUPunct/RUPunct_big

RUPunct_big install

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

RUPunct_big install url in huggingface.co:

https://huggingface.co/RUPunct/RUPunct_big

Url of RUPunct_big

RUPunct_big huggingface.co Url

Provider of RUPunct_big huggingface.co

RUPunct
ORGANIZATIONS

Other API from RUPunct