SikuBERT-verb-couplet-simplified-0.1
This is a fine-tuned SikuBERT model for token-level verb classification in Classical Chinese couplets.
It classifies each character as either verb (v) or non-verb (nv).
Usage
from transformers import pipeline
classifier = pipeline(
"token-classification",
model="qhchina/SikuBERT-verb-couplet-simplified-0.1",
)
text = "无边落木萧萧下,不尽长江滚滚来"
outputs = classifier(text)
for token in outputs:
label = 1 if token["entity"] == "v" else 0
print(f"{token['word']} -> {label}")
# 无 -> 0
# 边 -> 0
# 落 -> 0
# 木 -> 0
# 萧 -> 0
# 萧 -> 0
# 下 -> 1
# 不 -> 0
# 尽 -> 0
# 长 -> 0
# 江 -> 0
# 滚 -> 0
# 滚 -> 0
# 来 -> 1
- Downloads last month
- 6