diff --git a/spacy/vectors.pyx b/spacy/vectors.pyx index 2cb5b077f..3c238fe2d 100644 --- a/spacy/vectors.pyx +++ b/spacy/vectors.pyx @@ -63,7 +63,7 @@ cdef class Vectors: shape (tuple): Size of the table, as (# entries, # columns) data (numpy.ndarray): The vector data. keys (iterable): A sequence of keys, aligned with the data. - name (string): A name to identify the vectors table. + name (unicode): A name to identify the vectors table. RETURNS (Vectors): The newly created object. DOCS: https://spacy.io/api/vectors#init diff --git a/spacy/vocab.pyx b/spacy/vocab.pyx index 9c9f85d05..62c1791b9 100644 --- a/spacy/vocab.pyx +++ b/spacy/vocab.pyx @@ -45,6 +45,7 @@ cdef class Vocab: strings (StringStore): StringStore that maps strings to integers, and vice versa. lookups (Lookups): Container for large lookup tables and dictionaries. + name (unicode): Optional name to identify the vectors table. RETURNS (Vocab): The newly constructed object. """ lex_attr_getters = lex_attr_getters if lex_attr_getters is not None else {} diff --git a/website/docs/api/vectors.md b/website/docs/api/vectors.md index bfe0e5f3f..73300ee53 100644 --- a/website/docs/api/vectors.md +++ b/website/docs/api/vectors.md @@ -35,6 +35,7 @@ you can add vectors to later. | `data` | `ndarray[ndim=1, dtype='float32']` | The vector data. | | `keys` | iterable | A sequence of keys aligned with the data. | | `shape` | tuple | 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`. | +| `name` | unicode | A name to identify the vectors table. | | **RETURNS** | `Vectors` | The newly created object. | ## Vectors.\_\_getitem\_\_ {#getitem tag="method"} diff --git a/website/docs/api/vocab.md b/website/docs/api/vocab.md index 78e5f7541..ea0c2d219 100644 --- a/website/docs/api/vocab.md +++ b/website/docs/api/vocab.md @@ -21,13 +21,14 @@ Create the vocabulary. > vocab = Vocab(strings=["hello", "world"]) > ``` -| Name | Type | Description | -| ------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------ | -| `lex_attr_getters` | dict | A dictionary mapping attribute IDs to functions to compute them. Defaults to `None`. | -| `tag_map` | dict | A dictionary mapping fine-grained tags to coarse-grained parts-of-speech, and optionally morphological attributes. | -| `lemmatizer` | object | A lemmatizer. Defaults to `None`. | -| `strings` | `StringStore` / list | A [`StringStore`](/api/stringstore) that maps strings to hash values, and vice versa, or a list of strings. | -| **RETURNS** | `Vocab` | The newly constructed object. | +| Name | Type | Description | +| ------------------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------ | +| `lex_attr_getters` | dict | A dictionary mapping attribute IDs to functions to compute them. Defaults to `None`. | +| `tag_map` | dict | A dictionary mapping fine-grained tags to coarse-grained parts-of-speech, and optionally morphological attributes. | +| `lemmatizer` | object | A lemmatizer. Defaults to `None`. | +| `strings` | `StringStore` / list | A [`StringStore`](/api/stringstore) that maps strings to hash values, and vice versa, or a list of strings. | +| `vectors_name` 2.2 | unicode | A name to identify the vectors table. | +| **RETURNS** | `Vocab` | The newly constructed object. | ## Vocab.\_\_len\_\_ {#len tag="method"}