MulaiMulai sekarang secara gratis

Memuat model

Mari mulai dengan memuat sebuah model. spacy sudah diimpor.

Latihan ini adalah bagian dari kursus

NLP Lanjutan dengan spaCy

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Load the 'en_core_web_sm' model – spaCy is already imported
nlp = ____

text = "It’s official: Apple is the first U.S. public company to reach a $1 trillion market value"

# Process the text
doc = ____

# Print the document text
print(____.____)
Edit dan Jalankan Kode