From b07632a9ef295c41e8f5eac955270ffe160cd48f Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 3 Mar 2015 04:34:07 -0500 Subject: [PATCH] * Upd docs, improving description of parse tree navigation --- docs/source/api.rst | 10 ++++++---- docs/source/quickstart.rst | 12 ++++++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/docs/source/api.rst b/docs/source/api.rst index d7da14578..c1132baff 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -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) diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index 83cc2446b..db9a8da52 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -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