How to use

You can use this model with Transformers pipeline for token-classification.

from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline

nlp = pipeline("token-classification", model="enpchina/cws_chinese_shunpao_0923", aggregation_strategy="simple")
example = "非兩君之盡心於民事,以實心而行實政, 其能得此,於諸紳士也哉。"
cws_results = nlp(example)
print(cws_results)
print()
tab = [w["word"].replace(" ","") for w in cws_results]
print(tab)
print()
print(" ".join(tab))
Downloads last month
9
Safetensors
Model size
115M params
Tensor type
F32
·
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model authors have turned it off explicitly.