Update docstrings and API docs for Doc class

This commit is contained in:
ines 2017-05-18 23:59:44 +02:00
parent d42bc16868
commit b687ad109d
2 changed files with 22 additions and 1 deletions

View File

@ -267,7 +267,10 @@ cdef class Doc:
self._vector = value self._vector = value
property vector_norm: 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): def __get__(self):
if 'vector_norm' in self.user_hooks: if 'vector_norm' in self.user_hooks:
return self.user_hooks['vector_norm'](self) return self.user_hooks['vector_norm'](self)

View File

@ -501,6 +501,19 @@ p
+cell #[code numpy.ndarray[ndim=1, dtype='float32']] +cell #[code numpy.ndarray[ndim=1, dtype='float32']]
+cell A 1D numpy array representing the document's semantics. +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 +h(2, "attributes") Attributes
+table(["Name", "Type", "Description"]) +table(["Name", "Type", "Description"])
@ -514,6 +527,11 @@ p
+cell #[code Vocab] +cell #[code Vocab]
+cell The store of lexical types. +cell The store of lexical types.
+row
+cell #[code tensor]
+cell object
+cell Container for dense vector representations.
+row +row
+cell #[code user_data] +cell #[code user_data]
+cell - +cell -