Classical Chinese Verb Token Classifier
A BERT-based model for identifying verbs at the character level in classical Chinese texts (e.g., 五言 poetry).
Usage
Basic Pipeline
1from transformers import pipeline
2
3verb_pipeline = pipeline(
4 "token-classification",
5 model="qhchina/SikuBERT-verb-wuyan-singleline-0.1",
6)
7
8line = "天子借高名"
9results = verb_pipeline(line)
10
[{'entity': 'non-verb',
'score': np.float32(0.9975351),
'index': 1,
'word': '天',
'start': 0,
'end': 1},
{'entity': 'non-verb',
'score': np.float32(0.99758124),
'index': 2,
'word': '子',
'start': 1,
'end': 2},
{'entity': 'verb',
'score': np.float32(0.9810625),
'index': 3,
'word': '借',
'start': 2,
'end': 3},
{'entity': 'non-verb',
'score': np.float32(0.9940386),
'index': 4,
'word': '高',
'start': 3,
'end': 4},
{'entity': 'non-verb',
'score': np.float32(0.9912231),
'index': 5,
'word': '名',
'start': 4,
'end': 5}]