RUPunct / RUPunct_medium

huggingface.co
Total runs: 92
24-hour runs: 0
7-day runs: -2
30-day runs: 17
Model's Last Updated: May 01 2024
token-classification

Introduction of RUPunct_medium

Model Details of RUPunct_medium

RUPunct_medium - средняя модель из семейства RUPunct. Баланс между производительностью и качеством.

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

from transformers import pipeline
from transformers import AutoTokenizer

pt = "RUPunct/RUPunct_medium"

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_medium on huggingface.co

92
Total runs
0
24-hour runs
-2
3-day runs
-2
7-day runs
17
30-day runs

More Information About RUPunct_medium huggingface.co Model

More RUPunct_medium license Visit here:

https://choosealicense.com/licenses/mit

RUPunct_medium huggingface.co

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

RUPunct_medium huggingface.co Url

https://huggingface.co/RUPunct/RUPunct_medium

RUPunct RUPunct_medium online free

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

RUPunct RUPunct_medium online free url in huggingface.co:

https://huggingface.co/RUPunct/RUPunct_medium

RUPunct_medium install

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

RUPunct_medium install url in huggingface.co:

https://huggingface.co/RUPunct/RUPunct_medium

Url of RUPunct_medium

RUPunct_medium huggingface.co Url

Provider of RUPunct_medium huggingface.co

RUPunct
ORGANIZATIONS

Other API from RUPunct

huggingface.co

Total runs: 46.6K
Run Growth: 7.4K
Growth Rate: 15.45%
Updated:May 01 2024