diff --git a/spacy/tokens.pyx b/spacy/tokens.pyx index 9fa07f1ee..22bf6e2dc 100644 --- a/spacy/tokens.pyx +++ b/spacy/tokens.pyx @@ -368,6 +368,11 @@ cdef class Doc: return self[start] +# Enhance backwards compatibility by aliasing Doc to Tokens, for now +Tokens = Doc + + + cdef class Token: """An individual token --- i.e. a word, a punctuation symbol, etc. Created via Doc.__getitem__ and Doc.__iter__.