安装没啥好说的,如下
1 | pip install transformers |
常用pipelines
feature-extraction
(获得文本的向量化表示)fill-mask
(填充被遮盖的词、片段)ner
(命名实体识别)question-answering
(自动问答)sentiment-analysis
(情感分析)summarization
(自动摘要)text-generation
(文本生成)translation
(机器翻译)zero-shot-classification
(零训练样本分类)