1. Learn
  2. /
  3. Courses
  4. /
  5. Natural Language Processing with spaCy

Connected

Exercise

Annotation and preparing training data

After collecting data, you can annotate data in the required format for a spaCy model. In this exercise, you will practice forming the correct annotated data record for an NER task in the medical domain.

A sentence and two entities of entity_1 with a text of chest pain and a SYMPTOM type and entity_2 with a text of hyperthyroidism and a DISEASE type are available for you to use.

Instructions

100 XP
  • Complete the annotated_data record in the correct format.
  • Extract start and end characters of each entity and store as the corresponding variables.
  • Store the same input sentence and its entities in the proper training format as training_data.