| Trees | Indices | Help |
|---|
|
|
Defines classes and functions for parsing bodies of text to find words and prepare them for output to the user.
The top-level functions in this module are optimized to build Words from bodies of text containing more than a single Word. A chunking scheme based on the average length of words in the English language reduces the number of calls to Word.append and generally outperforms single character at a time processing (at least for English text).
Organization: IBM Corporation
Copyright: Copyright (c) 2005, 2007 IBM Corporation
License: The BSD License
All rights reserved. This program and the accompanying materials are made available under the terms of the BSD license which accompanies this distribution, and is available at http://www.opensource.org/licenses/bsd-license.php
|
|||
|
WordState Settings for Word parsing. |
|||
|
DefaultWordState Dummy WordState look-alike used by getContextFromString as a default set of settings when no state object is specified. |
|||
|
Word Represents a word in a body of text. |
|||
|
|||
| 3-tuple of Word |
|
||
| list of Word |
|
||
|
|||
| string |
VOWELS = _('AEIOUYaeiouy')Vowels in the used to determine if a word can be spoken |
||
|
|||
Gets the previous, current, and next Words relative to the given POR. If any word is missing, a None value is returned in its place. The string is considered to be at the zero offset of the Item indicated by the POR. Uses a default WordState object if none is provided. |
Parses the given string to build a list of Words using the given state and the given POR. When no POR is given a dummy POR is constructed. Each Word constructed will use the provided or constructed POR to indicate it's position as if the string was from the same component and Item. The character offset from the given or constructed POR is not used. The string is always considered to be at the zero offset of the Item indicated by the POR. Uses a default WordState object if none is provided.
|
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Mon Jun 4 15:33:15 2007 | http://epydoc.sourceforge.net |