* Alias Doc to Tokens, for backwards compatibility

This commit is contained in:
Matthew Honnibal 2015-07-08 18:59:35 +02:00
parent 462301d9e6
commit 2e51b5027a

View File

@ -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__.