Open
Description
Hello spaCy team,
I found a small discrepancy in the documentation.
The attribute lemma_
for a Span
is described as follows in the API docs:
The span's lemma. Equivalent to
"".join(token.text_with_ws for token in span)
.
Suggested Change
The equivalent code example should not contain token.text_with_ws
in the comprehension, but token.lemma_ + token.whitespace_
:
- | `lemma_` | The span's lemma. Equivalent to `"".join(token.text_with_ws for token in span)`. ~~str~~ |
+ | `lemma_` | The span's lemma. Equivalent to `"".join(token.lemma_ + token.whitespace_ for token in span).strip()`. ~~str~~ |
Which page or section is this issue related to?
- Docs: API Docs /
Span
- Code:
website/docs/api/span.mdx
/ Line 564