BaşlayınÜcretsiz Başlayın

Building a training loop

Let's write a simple training loop from scratch!

The pipeline you've created in the previous exercise is available as the nlp object. It already contains the entity recognizer with the added label 'GADGET'.

The small set of labelled examples that you've created previously is available as the global variable TRAINING_DATA. To see the examples, you can print them in your script or in the IPython shell. spacy and random have already been imported for you.

Bu egzersiz

Advanced NLP with spaCy

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Start the training
____.____

# Loop for 10 iterations
for itn in range(____):
    # Shuffle the training data
    random.shuffle(TRAINING_DATA)
Kodu Düzenle ve Çalıştır