* Improve API docs

This commit is contained in:
Matthew Honnibal 2015-01-27 17:56:36 +11:00
parent fd1bb648cc
commit d9bd3c611d

View File

@ -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)