Commit 08643d7e by Steven Bird

documentation updates

parent c5ac9cb4
...@@ -20,10 +20,8 @@ TRY_ZIPFILE_FIRST = False ...@@ -20,10 +20,8 @@ TRY_ZIPFILE_FIRST = False
@python_2_unicode_compatible @python_2_unicode_compatible
class LazyCorpusLoader(object): class LazyCorpusLoader(object):
""" """
==================================================================
To see the API documentation for this lazily loaded corpus, first To see the API documentation for this lazily loaded corpus, first
run corpus.ensure_loaded(), and then run help(this_corpus). run corpus.ensure_loaded(), and then run help(this_corpus).
==================================================================
LazyCorpusLoader is a proxy object which is used to stand in for a LazyCorpusLoader is a proxy object which is used to stand in for a
corpus object before the corpus is loaded. This allows NLTK to corpus object before the corpus is loaded. This allows NLTK to
......
...@@ -60,14 +60,12 @@ class CanvasWidget(object): ...@@ -60,14 +60,12 @@ class CanvasWidget(object):
is specified as the first argument to the ``CanvasWidget``'s is specified as the first argument to the ``CanvasWidget``'s
constructor. constructor.
Attributes Attributes. Each canvas widget can support a variety of
========== "attributes", which control how the canvas widget is displayed.
Each canvas widget can support a variety of "attributes", which Some typical examples attributes are ``color``, ``font``, and
control how the canvas widget is displayed. Some typical examples ``radius``. Each attribute has a default value. This default
attributes are ``color``, ``font``, and ``radius``. Each attribute value can be overridden in the constructor, using keyword
has a default value. This default value can be overridden in the arguments of the form ``attribute=value``:
constructor, using keyword arguments of the form
``attribute=value``:
>>> from nltk.draw.util import CanvasText >>> from nltk.draw.util import CanvasText
>>> cn = CanvasText(c, 'test', color='red') >>> cn = CanvasText(c, 'test', color='red')
...@@ -86,11 +84,9 @@ class CanvasWidget(object): ...@@ -86,11 +84,9 @@ class CanvasWidget(object):
For a list of the attributes supported by a type of canvas widget, For a list of the attributes supported by a type of canvas widget,
see its class documentation. see its class documentation.
Interaction Interaction. The attribute ``'draggable'`` controls whether the
=========== user can drag a canvas widget around the canvas. By default,
The attribute ``'draggable'`` controls whether the user can drag a canvas widgets are not draggable.
canvas widget around the canvas. By default, canvas widgets
are not draggable.
``CanvasWidget`` provides callback support for two types of user ``CanvasWidget`` provides callback support for two types of user
interaction: clicking and dragging. The method ``bind_click`` interaction: clicking and dragging. The method ``bind_click``
...@@ -104,10 +100,8 @@ class CanvasWidget(object): ...@@ -104,10 +100,8 @@ class CanvasWidget(object):
can be deregistered with the ``unbind_click`` and ``unbind_drag`` can be deregistered with the ``unbind_click`` and ``unbind_drag``
methods. methods.
Subclassing Subclassing. ``CanvasWidget`` is an abstract class. Subclasses
=========== are required to implement the following methods:
``CanvasWidget`` is an abstract class. Subclasses are required to
implement the following methods:
- ``__init__``: Builds a new canvas widget. It must perform the - ``__init__``: Builds a new canvas widget. It must perform the
following three tasks (in order): following three tasks (in order):
......
...@@ -43,8 +43,8 @@ source_suffix = '.rst' ...@@ -43,8 +43,8 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'NLTK' project = 'NLTK'
copyright = u'2013, NLTK Project' copyright = '2013, NLTK Project'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
...@@ -188,8 +188,8 @@ latex_elements = { ...@@ -188,8 +188,8 @@ latex_elements = {
# Grouping the document tree into LaTeX files. List of tuples # Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]). # (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [ latex_documents = [
('index', 'NLTK.tex', u'NLTK Documentation', ('index', 'NLTK.tex', 'NLTK Documentation',
u'Steven Bird', 'manual'), 'Steven Bird', 'manual'),
] ]
# The name of an image file (relative to this directory) to place at the top of # The name of an image file (relative to this directory) to place at the top of
...@@ -218,8 +218,8 @@ latex_documents = [ ...@@ -218,8 +218,8 @@ latex_documents = [
# One entry per manual page. List of tuples # One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section). # (source start file, name, description, authors, manual section).
man_pages = [ man_pages = [
('index', 'nltk', u'NLTK Documentation', ('index', 'nltk', 'NLTK Documentation',
[u'Steven Bird'], 1) ['Steven Bird'], 1)
] ]
# If true, show URL addresses after external links. # If true, show URL addresses after external links.
...@@ -232,7 +232,7 @@ man_pages = [ ...@@ -232,7 +232,7 @@ man_pages = [
# (source start file, target name, title, author, # (source start file, target name, title, author,
# dir menu entry, description, category) # dir menu entry, description, category)
texinfo_documents = [ texinfo_documents = [
('index', 'NLTK', u'NLTK Documentation', u'Steven Bird', ('index', 'NLTK', 'NLTK Documentation', 'Steven Bird',
'NLTK', 'One line description of project.', 'Miscellaneous'), 'NLTK', 'One line description of project.', 'Miscellaneous'),
] ]
......
...@@ -74,7 +74,7 @@ NLTK is under active development! Please join in: ...@@ -74,7 +74,7 @@ NLTK is under active development! Please join in:
* `subscribe to the nltk-dev mailing list <http://groups.google.com/group/nltk-dev>`_ * `subscribe to the nltk-dev mailing list <http://groups.google.com/group/nltk-dev>`_
* `contribute highly desired enhancements <https://github.com/nltk/nltk/issues?labels=enhancement&page=1&state=open>`_ * `contribute highly desired enhancements <https://github.com/nltk/nltk/issues?labels=enhancement&page=1&state=open>`_
* `fork NLTK on GitHub <https://github.com/nltk/nltk>` (and submit a pull request) * `fork NLTK on GitHub and submit pull requests <https://github.com/nltk/nltk>`_
Contents Contents
======== ========
...@@ -89,7 +89,7 @@ Contents ...@@ -89,7 +89,7 @@ Contents
Wiki <https://github.com/nltk/nltk/wiki> Wiki <https://github.com/nltk/nltk/wiki>
API <api/nltk> API <api/nltk>
HOWTO <http://nltk.org/howto> HOWTO <http://nltk.org/howto>
NLTK Development <https://github.com/nltk> GitHub Project <https://github.com/nltk/nltk>
team team
* :ref:`genindex` * :ref:`genindex`
......
NLTK News NLTK News
========= =========
NLTK 3.0a3 released : November 2013 NLTK 3.0a4 released : June 2014
FrameNet, universal tagset, misc efficiency improvements and bugfixes FrameNet, universal tagset, misc efficiency improvements and bugfixes
Several API changes: Several API changes, see https://github.com/nltk/nltk/wiki/Porting-your-code-to-NLTK-3.0
Tree: node -> label() For full details see:
Relextract: show_raw_rtuple() -> rtuple(), show_clause() -> clause()
WordNet: definition -> definition(), lemmas -> lemmas() etc
for details see:
https://raw.github.com/nltk/nltk/master/ChangeLog https://raw.github.com/nltk/nltk/master/ChangeLog
http://nltk.org/nltk3-alpha/ http://nltk.org/nltk3-alpha/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment