| Trees | Index | Help |
|---|
| Module BasicClasses :: Class Token |
|
object --+
|
BIObject --+
|
object --+ |
| |
BIXMLWriteable --+
|
Token
| Method Summary | |
|---|---|
__init__(self,
oStack,
attrs,
**args)
| |
Add a new subToken to the list of subtokens
self.subTokens. | |
The text of the token, assembled from the subtoken texts. | |
Regenerate the id instance variables. | |
writeXMLNestedItems(self,
out,
indent)
| |
| Inherited from BIXMLWriteable | |
Outputs the complete XML representation of the given object. | |
Prints the closing tag of the object: </tag>. | |
Writes opening tag into the XML output. | |
Computes the string representation of the object's attributes, which are included into the XML tag. | |
| Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) | |
| Inherited from type | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
| Instance Variable Summary | |
|---|---|
charOffset: An offset (zero-based) to the string
self.sentence.origText, that is, the original untokenized
text of the sentence. | |
| string | id: A unique id assigned to the token in the corpus. |
sentence |
sentence: The sentence to which this token belongs. |
| list | subTokens: A list of subtokens. |
| Class Variable Summary | |
|---|---|
list |
persistentAttrs: The list of attributes to be included in the XML output. |
str |
XMLTag = 'token'
|
| Method Details |
|---|
addSubToken(self, subToken)Add a newsubToken to the list of subtokens
self.subTokens. The subtokens must be added in the correct
order.
|
getText(self, sep='')The text of the token, assembled from the subtoken texts.
|
regenId(self)Regenerate theid instance variables. Only to be used
when the corpus data was changed (re-tokenized, etc...). This is not to
be used unless you know exactly what you are doing.
|
| Instance Variable Details |
|---|
idA unique id assigned to the token in the corpus.
|
sentenceThe sentence to which this token belongs.
|
subTokensA list ofsubtokens. The subtokens are ordered in the
same order as they appear in the XML file, which is the same order as
they appear in the sentence. This order must be preserved.
|
| Class Variable Details |
|---|
persistentAttrsThe list of attributes to be included in the XML output. By default an empty list, that is, no attributes are included by default.
|
XMLTag
|
| Trees | Index | Help |
|---|
| Generated by Epydoc 2.0 on Tue Nov 21 15:32:22 2006 | http://epydoc.sf.net |