mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-16 06:37:04 +03:00
968f6f0bda
## Description This PR adds the most relevant documentation of spaCy's Cython API. (Todo for when we publish this: rewrite `/api/#section-cython` and `/api/#cython` to `/api/cython#conventions`.) ### Types of change docs ## Checklist <!--- Before you submit the PR, go over this checklist and make sure you can tick off all the boxes. [] -> [x] --> - [x] I have submitted the spaCy Contributor Agreement. - [x] I ran the tests, and all new and existing tests passed. - [x] My changes don't require a change to the documentation, or if they do, I've added all required information.
44 lines
1.1 KiB
Plaintext
44 lines
1.1 KiB
Plaintext
//- 💫 DOCS > API > CYTHON > CLASSES > SPAN
|
|
|
|
p
|
|
| A Cython class providing access and methods for a slice of a #[code Doc]
|
|
| object.
|
|
|
|
+infobox
|
|
| This section documents the extra C-level attributes and methods that
|
|
| can't be accessed from Python. For the Python documentation, see
|
|
| #[+api("span") #[code Span]].
|
|
|
|
+h(3, "span_attributes") Attributes
|
|
|
|
+table(["Name", "Type", "Description"])
|
|
+row
|
|
+cell #[code doc]
|
|
+cell #[code Doc]
|
|
+cell The parent document.
|
|
|
|
+row
|
|
+cell #[code start]
|
|
+cell #[code int]
|
|
+cell The index of the first token of the span.
|
|
|
|
+row
|
|
+cell #[code end]
|
|
+cell #[code int]
|
|
+cell The index of the first token after the span.
|
|
|
|
+row
|
|
+cell #[code start_char]
|
|
+cell #[code int]
|
|
+cell The index of the first character of the span.
|
|
|
|
+row
|
|
+cell #[code end_char]
|
|
+cell #[code int]
|
|
+cell The index of the last character of the span.
|
|
|
|
+row
|
|
+cell #[code label]
|
|
+cell #[+abbr("uint64_t") #[code attr_t]]
|
|
+cell A label to attach to the span, e.g. for named entities.
|