Home | Trees | Indices | Help |
|
---|
|
object --+ | ChunkString
A string-based encoding of a particular chunking of a text.
Internally, the ChunkString
class uses a single string to
encode the chunking of the input text. This string contains a sequence
of angle-bracket delimited tags, with chunking indicated by braces. An
example of this encoding is:
{<DT><JJ><NN>}<VBN><IN>{<DT><NN>}<.>{<DT><NN>}<VBD><.>
ChunkString
are created from tagged texts (i.e.,
list
s of tokens
whose type is
TaggedType
). Initially, nothing is chunked.
The chunking of a ChunkString
can be modified with the
xform
method, which uses a regular expression to transform
the string representation. These transformations should only add and
remove braces; they should not modify the sequence of
angle-bracket delimited tags.
|
|||
|
|||
|
|||
|
|||
Tree
|
|
||
None
|
|
||
string
|
|
||
string
|
|
||
Inherited from |
|
|||
_debug The debug level. |
|||
list of pieces (tagged tokens and chunks)
|
_pieces The tagged tokens and chunks encoded by this ChunkString .
|
||
string
|
_str The internal string representation of the text's encoding. |
|
|||
Inherited from |
|
Construct a new
|
Check to make sure that
|
|
Apply the given transformation to this This transformation should only add and remove braces; it should not modify the sequence of angle-bracket delimited tags. Furthermore, this transformation may not result in improper bracketing. Note, in particular, that bracketing may not be nested.
|
repr(x)
|
str(x)
|
|
_debugThe debug level. See the constructor docs. |
_strThe internal string representation of the text's encoding. This string representation contains a sequence of angle-bracket delimited tags, with chunking indicated by braces. An example of this encoding is:{<DT><JJ><NN>}<VBN><IN>{<DT><NN>}<.>{<DT><NN>}<VBD><.>
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Wed Aug 27 15:08:52 2008 | http://epydoc.sourceforge.net |