From d9bd3c611de7238e89156b4de6a12e47ea7b0717 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 27 Jan 2015 17:56:36 +1100 Subject: [PATCH] * Improve API docs --- docs/source/api.rst | 55 ++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/docs/source/api.rst b/docs/source/api.rst index 6d6a3a48f..209d39cae 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -50,32 +50,37 @@ Internals .. autoclass:: spacy.tokens.Token - :members: + .. automethod:: child - - +-----------+------+-----------+---------+-----------+------------------------------------+ - | Attribute | Type | Attribute | Type | Attribute | Type | - +===========+======+===========+=========+===========+====================================+ - | orth | int | orth\_ | unicode | idx | int | - +-----------+------+-----------+---------+-----------+------------------------------------+ - | lemma | int | lemma\_ | unicode | cluster | int | - +-----------+------+-----------+---------+-----------+------------------------------------+ - | lower | int | lower\_ | unicode | length | int | - +-----------+------+-----------+---------+-----------+------------------------------------+ - | norm | int | norm\_ | unicode | prob | float | - +-----------+------+-----------+---------+-----------+------------------------------------+ - | shape | int | shape\_ | unicode | repvec | ndarray(shape=(300,), dtype=float) | - +-----------+------+-----------+---------+-----------+------------------------------------+ - | prefix | int | prefix\_ | unicode | | - +-----------+------+-----------+---------+------------------------------------------------+ - | suffix | int | suffix\_ | unicode | | - +-----------+------+-----------+---------+------------------------------------------------+ - | pos | int | pos\_ | unicode | | - +-----------+------+-----------+---------+------------------------------------------------+ - | tag | int | tag\_ | unicode | | - +-----------+------+-----------+---------+------------------------------------------------+ - | dep | int | dep\_ | unicode | | - +-----------+------+-----------+---------+------------------------------------------------+ + +--------------------------------------------------------------------------------+ + | **Context-independent Attributes** (calculated once per orth-value in vocab) | + +-----------------+-------------+-----------+------------------------------------+ + | Attribute | Type | Attribute | Type | + +=================+=============+===========+====================================+ + | orth/orth\_ | int/unicode | __len__ | int | + +-----------------+-------------+-----------+------------------------------------+ + | lower/lower\_ | int/unicode | cluster | int | + +-----------------+-------------+-----------+------------------------------------+ + | norm/norm\_ | int/unicode | prob | float | + +-----------------+-------------+-----------+------------------------------------+ + | shape/shape\_ | int/unicode | repvec | ndarray(shape=(300,), dtype=float) | + +-----------------+-------------+-----------+------------------------------------+ + | prefix/prefix\_ | int/unicode | | | + +-----------------+-------------+-----------+------------------------------------+ + | suffix/suffix\_ | int/unicode | | | + +-----------------+-------------+-----------+------------------------------------+ + | **Context-dependent Attributes** (calculated once per token in input) | + +-----------------+-------------+-----------+------------------------------------+ + | Attribute | Type | Attribute | Type | + +-----------------+-------------+-----------+------------------------------------+ + | whitespace\_ | unicode | string | unicode | + +-----------------+-------------+-----------+------------------------------------+ + | pos/pos\_ | int/unicode | dep/dep\_ | int/unicode | + +-----------------+-------------+-----------+------------------------------------+ + | tag/tag\_ | int/unicode | | | + +-----------------+-------------+-----------+------------------------------------+ + | lemma/lemma\_ | int/unicode | | | + +-----------------+-------------+-----------+------------------------------------+ .. py:class:: vocab.Vocab(self, data_dir=None, lex_props_getter=None)