              if before not in self.pipe_names:
                  raise ValueError(Errors.E001.format(name=before, opts=self.pipe_names))
              return self.pipe_names.index(before)
          elif isinstance(after, str):
              if after not in self.pipe_names:
                  raise ValueError(Errors.E001.format(name=after, opts=self.pipe_names))
              return self.pipe_names.index(after) + 1
          # We're only accepting indices referring to components that exist
          # (can't just do isinstance here because bools are instance of int, too)
          elif type(before) == int:
              if before >= len(self.pipeline) or before < 0:
                  err = Errors.E959.format(dir="before", idx=before, opts=self.pipe_names)
 
</s> remove             if before >= len(self.pipeline) or before < 0:
                err = Errors.E959.format(dir="before", idx=before, opts=self.pipe_names)
 </s> add             if before >= len(self._pipeline) or before < 0:
                err = Errors.E959.format(
                    dir="before", idx=before, opts=self._pipe_names
                ) </s> remove             if before not in self.pipe_names:
                raise ValueError(Errors.E001.format(name=before, opts=self.pipe_names))
            return self.pipe_names.index(before)
 </s> add             if before not in self._pipe_names:
                raise ValueError(Errors.E001.format(name=before, opts=self._pipe_names))
            return self._pipe_names.index(before) </s> remove             if after >= len(self.pipeline) or after < 0:
                err = Errors.E959.format(dir="after", idx=after, opts=self.pipe_names)
 </s> add             if after >= len(self._pipeline) or after < 0:
                err = Errors.E959.format(dir="after", idx=after, opts=self._pipe_names) </s> remove             return len(self.pipeline)
 </s> add             return len(self._pipeline) </s> remove         raise ValueError(Errors.E006.format(args=all_args, opts=self.pipe_names))
 </s> add         raise ValueError(Errors.E006.format(args=all_args, opts=self._pipe_names))
            if after not in self._pipe_names:
                raise ValueError(Errors.E001.format(name=after, opts=self._pipe_names))
            return self._pipe_names.index(after) + 1
              if before not in self.pipe_names:
                  raise ValueError(Errors.E001.format(name=before, opts=self.pipe_names))
              return self.pipe_names.index(before)
          elif isinstance(after, str):
            if after not in self._pipe_names:
                raise ValueError(Errors.E001.format(name=after, opts=self._pipe_names))
            return self._pipe_names.index(after) + 1
            if after not in self._pipe_names:
                raise ValueError(Errors.E001.format(name=after, opts=self._pipe_names))
            return self._pipe_names.index(after) + 1
            if after not in self._pipe_names:
                raise ValueError(Errors.E001.format(name=after, opts=self._pipe_names))
            return self._pipe_names.index(after) + 1
          # We're only accepting indices referring to components that exist
          # (can't just do isinstance here because bools are instance of int, too)
          elif type(before) == int:
              if before >= len(self.pipeline) or before < 0:
                  err = Errors.E959.format(dir="before", idx=before, opts=self.pipe_names)
keep keep keep keep replace replace replace keep keep keep keep keep
 Allow loaded but disabled components 
spacy/language.py