          self.length = 0
  
      def __getitem__(self, i):
          bounds_check(i, self.length, PADDING)
          return Token(self._string_store, i, self.idx[i], self.pos[i], self.ner[i],
                       self.lex[i][0])
  
      def __iter__(self):
          for i in range(self.length):
              yield self[i]
  
 
</s> remove             self.lex[i] = &EMPTY_LEXEME
        self.lex += PADDING
        self.idx += PADDING
        self.pos += PADDING
        self.ner += PADDING
 </s> add             self._data[i] = EMPTY_TOKEN
        self.data = self._data + PADDING </s> remove                 output[i, j] = get_attr(self.lex[i], feature)
 </s> add                 output[i, j] = get_attr(self.data[i].lex, feature) </s> remove             attr = get_attr(self.lex[i], attr_id)
 </s> add             attr = get_attr(self.data[i].lex, attr_id) </s> remove         self.lex[self.length] = lexeme
        self.idx[self.length] = idx
        self.pos[self.length] = 0
        self.ner[self.length] = 0
 </s> add         cdef TokenC* t = &self.data[self.length]
        t.lex = lexeme
        t.idx = idx
        t.pos = 0
        t.sense = 0 </s> remove         self._lex_ptr = <const Lexeme**>self.mem.realloc(self._lex_ptr, n * sizeof(Lexeme*))
        self._idx_ptr = <int*>self.mem.realloc(self._idx_ptr, n * sizeof(int))
        self._pos_ptr = <int*>self.mem.realloc(self._pos_ptr, n * sizeof(int))
        self._ner_ptr = <int*>self.mem.realloc(self._ner_ptr, n * sizeof(int))
        self.lex = self._lex_ptr + PADDING
        self.idx = self._idx_ptr + PADDING
        self.pos = self._pos_ptr + PADDING
        self.ner = self._ner_ptr + PADDING
 </s> add         self._data = <TokenC*>self.mem.realloc(self._data, n * sizeof(TokenC))
        self.data = self._data + PADDING
        cdef int i
        return Token(self._string_store, i, self.data[i].idx, self.data[i].pos,
                     self.data[i].sense, self.data[i].lex[0])
          self.length = 0
  
      def __getitem__(self, i):
          bounds_check(i, self.length, PADDING)
        return Token(self._string_store, i, self.data[i].idx, self.data[i].pos,
                     self.data[i].sense, self.data[i].lex[0])
        return Token(self._string_store, i, self.data[i].idx, self.data[i].pos,
                     self.data[i].sense, self.data[i].lex[0])
  
      def __iter__(self):
          for i in range(self.length):
              yield self[i]
  
keep keep keep keep replace replace keep keep keep keep keep
 * Introduce a TokenC struct, to handle token indices, pos tags and sense tags 
spacy/tokens.pyx