前置知识: Python

Python与NLP

00:00
1 min Intermediate 2026/6/14

自然语言处理

1. spaCy

import spacy

nlp = spacy.load("zh_core_web_sm")
doc = nlp("自然语言处理是人工智能的重要方向")

for ent in doc.ents:
  print(ent.text, ent.label_)

2. Transformers

from transformers import pipeline

classifier = pipeline("sentiment-analysis")
result = classifier("这个产品非常好用")

知识检测

学习进度

-- 已学文档
--% 知识覆盖率

学习推荐

专注模式