From b2f88e206036266ab68af80a7248e630d7b4ff95 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Mon, 21 Oct 2019 12:26:07 +0200 Subject: [PATCH] Fix formatting [ci skip] --- website/docs/api/vocab.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/website/docs/api/vocab.md b/website/docs/api/vocab.md index b94789921..e024ab54a 100644 --- a/website/docs/api/vocab.md +++ b/website/docs/api/vocab.md @@ -166,10 +166,9 @@ cosines are calculated in minibatches, to reduce memory usage. ## Vocab.get_vector {#get_vector tag="method" new="2"} Retrieve a vector for a word in the vocabulary. Words can be looked up by string -or hash value. If no vectors data is loaded, a `ValueError` is raised. - -If `minn` is defined, then the resulting vector uses Fasttext's -subword features by average over ngrams of `orth`. (Introduced in spaCy `v2.1`) +or hash value. If no vectors data is loaded, a `ValueError` is raised. If `minn` +is defined, then the resulting vector uses [FastText](https://fasttext.cc/)'s +subword features by average over ngrams of `orth` (introduced in spaCy `v2.1`). > #### Example > @@ -178,12 +177,12 @@ subword features by average over ngrams of `orth`. (Introduced in spaCy `v2.1`) > nlp.vocab.get_vector("apple", minn=1, maxn=5) > ``` -| Name | Type | Description | -| ----------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `orth` | int / unicode | The hash value of a word, or its unicode string. | -| `minn` | int | Minimum n-gram length used for Fasttext's ngram computation. Defaults to the length of `orth`. | -| `maxn` | int | Maximum n-gram length used for Fasttext's ngram computation. Defaults to the length of `orth`. | -| **RETURNS** | `numpy.ndarray[ndim=1, dtype='float32']` | A word vector. Size and shape are determined by the `Vocab.vectors` instance. | +| Name | Type | Description | +| ----------------------------------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `orth` | int / unicode | The hash value of a word, or its unicode string. | +| `minn` 2.1 | int | Minimum n-gram length used for FastText's ngram computation. Defaults to the length of `orth`. | +| `maxn` 2.1 | int | Maximum n-gram length used for FastText's ngram computation. Defaults to the length of `orth`. | +| **RETURNS** | `numpy.ndarray[ndim=1, dtype='float32']` | A word vector. Size and shape are determined by the `Vocab.vectors` instance. | ## Vocab.set_vector {#set_vector tag="method" new="2"}