mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 17:06:29 +03:00
Update docstring of Doc.__getitem__
This commit is contained in:
parent
3fd3bc79aa
commit
0f601b8b75
|
@ -82,10 +82,10 @@ cdef class Doc:
|
|||
self._vector = None
|
||||
|
||||
def __getitem__(self, object i):
|
||||
"""Get a token.
|
||||
"""Get a Token or a Span from the Doc.
|
||||
|
||||
Returns:
|
||||
token (Token):
|
||||
token (Token) or span (Span):
|
||||
"""
|
||||
if isinstance(i, slice):
|
||||
start, stop = normalize_slice(len(self), i.start, i.stop, i.step)
|
||||
|
|
Loading…
Reference in New Issue
Block a user