* Upd docs, improving description of parse tree navigation

This commit is contained in:
Matthew Honnibal 2015-03-03 04:34:07 -05:00
parent dbe26f5793
commit b07632a9ef
2 changed files with 16 additions and 6 deletions

View File

@ -2,9 +2,6 @@
API
===
.. warning:: The documentation here is currently being rewritten. If something
doesn't make sense, the docs might be simply wrong. If so, please report it.
.. autoclass:: spacy.en.English
@ -188,7 +185,12 @@ API
rights
An iterator for the immediate rightward syntactic children of the word.
children
An iterator that yields from lefts, and then yields from rights.
subtree
An iterator for the part of the sentence syntactically governed by the
word, including the word itself.
.. py:class:: vocab.Vocab(self, data_dir=None, lex_props_getter=None)

View File

@ -117,9 +117,17 @@ the original orthographic form of the word.
.. py:method:: nbor(self, i=1) --> Token
.. py:method:: child(self, i=1) --> Token
.. py:attribute:: n_lefts --> int
.. py:attribute:: n_rights --> int
.. py:method:: sibling(self, i=1) --> Token
.. py:attribute:: lefts --> Iterator[Token]
.. py:attribute:: rights --> Iterator[Token]
.. py:attribute:: children --> Iterator[Token]
.. py:attribute:: subtree --> Iterator[Token]
.. py:attribute:: head: Token