Module BasicClasses :: Class SubToken
[show private | hide private]
[frames | no frames]

Class SubToken

    object --+    
             |    
      BIObject --+
                 |
    object --+   |
             |   |
BIXMLWriteable --+
                 |
                SubToken


The representation of a subToken.
Method Summary
  __init__(self, oStack, attrs, **args)
  getCharOffset(self)
Returns the zero-based character offset of this subtoken in the string representing the original untokenized text of the sentence.
    Inherited from BIXMLWriteable
  writeXML(self, out, indent, **kwArgs)
Outputs the complete XML representation of the given object.
  writeXMLClose(self, out, indent)
Prints the closing tag of the object: </tag>.
  writeXMLOpen(self, out, indent, closing)
Writes opening tag into the XML output.
  XMLAttrs(self)
Computes the string representation of the object's attributes, which are included into the XML tag.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)
    Inherited from type
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T

Instance Variable Summary
string id: The unique identifier of this subtoken in the corpus.
integer sequence: The sequential number of the subtoken in the sentence (that is, not the Token).
string text: The text of the subtoken.
Token token: The token to which this subtoken belongs.

Class Variable Summary
list persistentAttrs: The list of attributes to be included in the XML output.
str XMLTag = 'subtoken'

Method Details

getCharOffset(self)

Returns the zero-based character offset of this subtoken in the string representing the original untokenized text of the sentence.

Instance Variable Details

id

The unique identifier of this subtoken in the corpus.
Type:
string

sequence

The sequential number of the subtoken in the sentence (that is, not the Token). First subtoken in the sentence is 0, second is 1, etc.
Type:
integer

text

The text of the subtoken.
Type:
string

token

The token to which this subtoken belongs.
Type:
Token

Class Variable Details

persistentAttrs

The list of attributes to be included in the XML output. By default an empty list, that is, no attributes are included by default.
Type:
list
Value:
['id', 'text']                                                         

XMLTag

Type:
str
Value:
'subtoken'                                                             

Generated by Epydoc 2.0 on Tue Nov 21 15:32:22 2006 http://epydoc.sf.net