diff --git a/spacy/tokens/doc.pyx b/spacy/tokens/doc.pyx index 949fdea29..375db5710 100644 --- a/spacy/tokens/doc.pyx +++ b/spacy/tokens/doc.pyx @@ -267,7 +267,10 @@ cdef class Doc: self._vector = value property vector_norm: - # TODO: docstrings / docs + """The L2 norm of the document's vector representation. + + RETURNS (float): The L2 norm of the vector representation. + """ def __get__(self): if 'vector_norm' in self.user_hooks: return self.user_hooks['vector_norm'](self) diff --git a/website/docs/api/doc.jade b/website/docs/api/doc.jade index 77c98a6a3..392b35aac 100644 --- a/website/docs/api/doc.jade +++ b/website/docs/api/doc.jade @@ -501,6 +501,19 @@ p +cell #[code numpy.ndarray[ndim=1, dtype='float32']] +cell A 1D numpy array representing the document's semantics. ++h(2, "vector_norm") Doc.vector_norm + +tag property + +tag requires model + +p + | The L2 norm of the document's vector representation. + ++table(["Name", "Type", "Description"]) + +footrow + +cell return + +cell float + +cell The L2 norm of the vector representation. + +h(2, "attributes") Attributes +table(["Name", "Type", "Description"]) @@ -514,6 +527,11 @@ p +cell #[code Vocab] +cell The store of lexical types. + +row + +cell #[code tensor] + +cell object + +cell Container for dense vector representations. + +row +cell #[code user_data] +cell -