mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-26 17:24:41 +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"!"]
|
||||
> ```
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----------- | ---------------------------------------- | ------------------------------------------------------- |
|
||||
| `doc` | `Doc` | The parent document. |
|
||||
| `start` | int | The index of the first token of 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. |
|
||||
| `vector` | `numpy.ndarray[ndim=1, dtype='float32']` | A meaning representation of the span. |
|
||||
| **RETURNS** | `Span` | The newly constructed object. |
|
||||
| Name | Type | Description |
|
||||
| ----------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `doc` | `Doc` | The parent document. |
|
||||
| `start` | int | The index of the first token of the span. |
|
||||
| `end` | int | The index of the first token after the span. |
|
||||
| `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. |
|
||||
| **RETURNS** | `Span` | The newly constructed object. |
|
||||
|
||||
## Span.\_\_getitem\_\_ {#getitem tag="method"}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user