Doc.char_span arg: alignment_mode (#6591)

Currently labeled "mode", actually "alignment_mode"
This commit is contained in:
Gareth Sparks 2020-12-18 03:54:56 -05:00 committed by GitHub
parent 7c9a2f298c
commit efc229c3f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,7 +206,7 @@ Create a `Span` object from the slice `doc.text[start_idx:end_idx]`. Returns
| `label` | uint64 / unicode | A label to attach to the span, e.g. for named entities. | | `label` | uint64 / unicode | A label to attach to the span, e.g. for named entities. |
| `kb_id` <Tag variant="new">2.2</Tag> | uint64 / unicode | An ID from a knowledge base to capture the meaning of a named entity. | | `kb_id` <Tag variant="new">2.2</Tag> | uint64 / unicode | An ID from a knowledge base to capture the meaning of a named entity. |
| `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. |
| `mode` | `str` | How character indices snap to token boundaries. Options: "strict" (no snapping), "inside" (span of all tokens completely within the character span), "outside" (span of all tokens at least partially covered by the character span). Defaults to "strict". | | `alignment_mode` | `str` | How character indices snap to token boundaries. Options: "strict" (no snapping), "inside" (span of all tokens completely within the character span), "outside" (span of all tokens at least partially covered by the character span). Defaults to "strict". |
| **RETURNS** | `Span` | The newly constructed object or `None`. | | **RETURNS** | `Span` | The newly constructed object or `None`. |
## Doc.similarity {#similarity tag="method" model="vectors"} ## Doc.similarity {#similarity tag="method" model="vectors"}