  
          DOCS: https://spacy.io/api/tagger#get_loss
          """
          loss_func = SequenceCategoricalCrossentropy(names=self.labels, normalize=False)
          truths = [eg.get_aligned("tag", as_string=True) for eg in examples]
          d_scores, loss = loss_func(scores, truths)
          if self.model.ops.xp.isnan(loss):
              raise ValueError("nan value when computing loss")
          return float(loss), d_scores
  
 
</s> remove             for x in eg.get_aligned("sent_start"):
 </s> add             for x in eg.get_aligned("SENT_START"): </s> remove             raise KeyError(Errors.E983.format(key=key, dict="token_annotation", keys=remapping.keys()))
 </s> add             all_keys = set(remapping.values())
            all_keys.update(remapping.keys())
            raise KeyError(Errors.E983.format(key=key, dict="token_annotation", keys=all_keys)) </s> remove     aligned_tags = example.get_aligned("tag", as_string=True)
 </s> add     aligned_tags = example.get_aligned("TAG", as_string=True) </s> remove     aligned_tags = example.get_aligned("tag", as_string=True)
 </s> add     aligned_tags = example.get_aligned("TAG", as_string=True)
        truths = [eg.get_aligned("TAG", as_string=True) for eg in examples]
  
          DOCS: https://spacy.io/api/tagger#get_loss
          """
          loss_func = SequenceCategoricalCrossentropy(names=self.labels, normalize=False)
        truths = [eg.get_aligned("TAG", as_string=True) for eg in examples]
          d_scores, loss = loss_func(scores, truths)
          if self.model.ops.xp.isnan(loss):
              raise ValueError("nan value when computing loss")
          return float(loss), d_scores
  
keep keep keep keep replace keep keep keep keep keep
 Example Dict format consistency (#5858)

* consistently use upper-case IDS in token_annotation format and for get_aligned

* remove ID from to_dict (not used in from_dict either)

* fix test

Co-authored-by: Matthew Honnibal <honnibal+gh@gmail.com> 
spacy/pipeline/tagger.pyx