mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-04 21:50:35 +03:00
Update Span.__init__ docs (see #3445) [ci skip]
This commit is contained in:
parent
c7f26abe5f
commit
dac8f8ff99
|
@ -18,14 +18,14 @@ Create a Span object from the `slice doc[start : end]`.
|
||||||
> assert [t.text for t in span] == [u"it", u"back", u"!"]
|
> assert [t.text for t in span] == [u"it", u"back", u"!"]
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
| ----------- | ---------------------------------------- | ------------------------------------------------------- |
|
| ----------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||||
| `doc` | `Doc` | The parent document. |
|
| `doc` | `Doc` | The parent document. |
|
||||||
| `start` | int | The index of the first token of the span. |
|
| `start` | int | The index of the first token of the span. |
|
||||||
| `end` | int | The index of the first token after the span. |
|
| `end` | int | The index of the first token after the span. |
|
||||||
| `label` | int | A label to attach to the span, e.g. for named entities. |
|
| `label` | int / unicode | A label to attach to the span, e.g. for named entities. As of v2.1, the label can also be a unicode string. |
|
||||||
| `vector` | `numpy.ndarray[ndim=1, dtype='float32']` | A meaning representation of the span. |
|
| `vector` | `numpy.ndarray[ndim=1, dtype='float32']` | A meaning representation of the span. |
|
||||||
| **RETURNS** | `Span` | The newly constructed object. |
|
| **RETURNS** | `Span` | The newly constructed object. |
|
||||||
|
|
||||||
## Span.\_\_getitem\_\_ {#getitem tag="method"}
|
## Span.\_\_getitem\_\_ {#getitem tag="method"}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user