From b334a7a54d449ece2a6470bc28071074dbf57c9d Mon Sep 17 00:00:00 2001 From: Martin Schorfmann Date: Fri, 12 Apr 2024 15:48:39 +0200 Subject: [PATCH 1/3] Correct code example for Span.lemma_ in API Docs (#13405) --- website/docs/api/span.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/api/span.mdx b/website/docs/api/span.mdx index 41422a5b4e1..74467431a84 100644 --- a/website/docs/api/span.mdx +++ b/website/docs/api/span.mdx @@ -561,7 +561,7 @@ overlaps with will be returned. | `orth_` | Verbatim text content (identical to `Span.text`). Exists mostly for consistency with the other attributes. ~~str~~ | | `label` | The hash value of the span's label. ~~int~~ | | `label_` | The span's label. ~~str~~ | -| `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~~ | | `kb_id` | The hash value of the knowledge base ID referred to by the span. ~~int~~ | | `kb_id_` | The knowledge base ID referred to by the span. ~~str~~ | | `ent_id` | The hash value of the named entity the root token is an instance of. ~~int~~ | From ce8892585fa56ec93ec3a55f894fdc06d6553b85 Mon Sep 17 00:00:00 2001 From: Martin Schorfmann Date: Fri, 12 Apr 2024 15:52:39 +0200 Subject: [PATCH 2/3] Correct documented return type of Vocab.to_bytes in API docs --- website/docs/api/vocab.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/api/vocab.mdx b/website/docs/api/vocab.mdx index 57618397da5..2466f561bb8 100644 --- a/website/docs/api/vocab.mdx +++ b/website/docs/api/vocab.mdx @@ -283,7 +283,7 @@ Serialize the current state to a binary string. | -------------- | ------------------------------------------------------------------------------------------- | | _keyword-only_ | | | `exclude` | String names of [serialization fields](#serialization-fields) to exclude. ~~Iterable[str]~~ | -| **RETURNS** | The serialized form of the `Vocab` object. ~~Vocab~~ | +| **RETURNS** | The serialized form of the `Vocab` object. ~~bytes~~ | ## Vocab.from_bytes {id="from_bytes",tag="method"} From d9c368d3aa4cc80c960828b8787f5ebfb2959f0a Mon Sep 17 00:00:00 2001 From: Martin Schorfmann Date: Fri, 12 Apr 2024 15:57:52 +0200 Subject: [PATCH 3/3] Correct wording for Vectors.__init__ in API docs --- website/docs/api/vectors.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/api/vectors.mdx b/website/docs/api/vectors.mdx index 0e92eb12ba4..da2d7831a93 100644 --- a/website/docs/api/vectors.mdx +++ b/website/docs/api/vectors.mdx @@ -51,7 +51,7 @@ modified later. | `strings` | The string store. A new string store is created if one is not provided. Defaults to `None`. ~~Optional[StringStore]~~ | | `shape` | Size of the table as `(n_entries, n_columns)`, the number of entries and number of columns. Not required if you're initializing the object with `data` and `keys`. ~~Tuple[int, int]~~ | | `data` | The vector data. ~~numpy.ndarray[ndim=2, dtype=float32]~~ | -| `keys` | A sequence of keys aligned with the data. ~~Iterable[Union[str, int]]~~ | +| `keys` | An iterable of keys aligned with the data. ~~Iterable[Union[str, int]]~~ | | `name` | A name to identify the vectors table. ~~str~~ | | `mode` 3.2 | Vectors mode: `"default"` or [`"floret"`](https://github.com/explosion/floret) (default: `"default"`). ~~str~~ | | `minn` 3.2 | The floret char ngram minn (default: `0`). ~~int~~ |