1. Learn
  2. /
  3. 课程
  4. /
  5. 使用 Hugging Face

Connected

道练习

语法正确性

文本分类是将输入文本标注为预定义类别的过程。它可以用于情感分析(positive 或 negative)、垃圾短信检测(spam 或 not spam),甚至语法错误检测。

请探索如何使用 text-classification 流水线来检查一句输入语句是否存在语法错误。

transformers 库中的 pipeline 已为您加载。

说明

100 XP
  • 为任务 text-classification 创建一个流水线,并使用模型 "abdulmatinomotoso/English_Grammar_Checker",将该流水线保存为 grammar_checker。
  • 使用 grammar_checker 对给定的输入句子的语法正确性进行预测,并将结果保存为 output。