                      q += 1
                  elif action == ACCEPT:
                      # TODO: What to do about patterns starting with ZERO? Need to
                      # adjust the start position.
                      start = state.first
                      end = token_i+1
                      ent_id = state.second[1].attrs[0].value
                      label = state.second[1].attrs[1].value
                      acceptor = self._acceptors.get(ent_id)
                      if acceptor is not None:
                          match = acceptor(doc, ent_id, label, start, end)
 
</s> remove                     start = token_i
                    end = token_i+1
 </s> add                     start = token.idx
                    end = token.idx + token.lex.length </s> remove                     if acceptor is None or acceptor(doc, ent_id, label, start, end):
                        matches.append((ent_id, label, start, end))
 </s> add                     acceptor = self._acceptors.get(ent_id)
                    if acceptor is not None:
                        match = acceptor(doc, ent_id, label, start, end)
                        if match:
                            ent_id, label, start, end = match
                    matches.append((ent_id, label, start, end))
                    start = doc.c[state.first].idx
                    end = doc.c[token_i].idx + doc.c[token_i].lex.length
                      q += 1
                  elif action == ACCEPT:
                      # TODO: What to do about patterns starting with ZERO? Need to
                      # adjust the start position.
                    start = doc.c[state.first].idx
                    end = doc.c[token_i].idx + doc.c[token_i].lex.length
                    start = doc.c[state.first].idx
                    end = doc.c[token_i].idx + doc.c[token_i].lex.length
                      ent_id = state.second[1].attrs[0].value
                      label = state.second[1].attrs[1].value
                      acceptor = self._acceptors.get(ent_id)
                      if acceptor is not None:
                          match = acceptor(doc, ent_id, label, start, end)
keep keep keep keep replace replace keep keep keep keep keep
 Have the matcher return character offsets, to handle the match better. 
spacy/matcher.pyx