几乎穷举所有模型,也无法达到在线演示的效果
coarse = hanlp.load(hanlp.pretrained.tok.MSR_TOK_ELECTRA_BASE_CRF)
hanlp1 = hanlp.load(hanlp.pretrained.tok.CTB9_TOK_ELECTRA_BASE_CRF)
hanlp2 = hanlp.load(hanlp.pretrained.tok.COARSE_ELECTRA_SMALL_ZH)
hanlp3 = hanlp.load(hanlp.pretrained.tok.FINE_ELECTRA_SMALL_ZH)
hanlp4 = hanlp.load(hanlp.pretrained.tok.SIGHAN2005_PKU_BERT_BASE_ZH)
print(coarse([‘定语从句2—写作应用。。’],tasks=‘tok/coarse’))
print(hanlp2([‘定语从句2—写作应用。。’],tasks=‘tok/coarse’))
print(hanlp1([‘定语从句2—写作应用。。’],tasks=‘tok/coarse’))
print(hanlp3([‘定语从句2—写作应用。。’],tasks=‘tok/coarse’))
print(hanlp4([‘定语从句2—写作应用。。’],tasks=‘tok/coarse’))