mirror of https://github.com/explosion/spaCy.git
* Alias Doc to Tokens, for backwards compatibility
This commit is contained in:
parent
462301d9e6
commit
2e51b5027a
|
@ -368,6 +368,11 @@ cdef class Doc:
|
||||||
return self[start]
|
return self[start]
|
||||||
|
|
||||||
|
|
||||||
|
# Enhance backwards compatibility by aliasing Doc to Tokens, for now
|
||||||
|
Tokens = Doc
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cdef class Token:
|
cdef class Token:
|
||||||
"""An individual token --- i.e. a word, a punctuation symbol, etc. Created
|
"""An individual token --- i.e. a word, a punctuation symbol, etc. Created
|
||||||
via Doc.__getitem__ and Doc.__iter__.
|
via Doc.__getitem__ and Doc.__iter__.
|
||||||
|
|
Loading…
Reference in New Issue