mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 09:26:27 +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
|
self._vector = None
|
||||||
|
|
||||||
def __getitem__(self, object i):
|
def __getitem__(self, object i):
|
||||||
"""Get a token.
|
"""Get a Token or a Span from the Doc.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
token (Token):
|
token (Token) or span (Span):
|
||||||
"""
|
"""
|
||||||
if isinstance(i, slice):
|
if isinstance(i, slice):
|
||||||
start, stop = normalize_slice(len(self), i.start, i.stop, i.step)
|
start, stop = normalize_slice(len(self), i.start, i.stop, i.step)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user