Text vectorizer that capture feature offset in the text?
One approach is to create another matrix that stores this information. Scikit-learn stores text features in a  document-by-token matrix. The cells of this matrix would be the token index in a document. This matrix then could be used as features during modeling.

It would require writing a custom vectorizer which would be similar to scikit-learn's CountVector implementation.