Package dataprocessor :: Package output :: Module taraxuwriter :: Class TaraXUWriter
[hide private]
[frames] | no frames]

Class TaraXUWriter

source code

             object --+            
                      |            
xmlwriter.GenericWriter --+        
                          |        
 xmlwriter.GenericXMLWriter --+    
                              |    
            xmlwriter.XmlWriter --+
                                  |
                                 TaraXUWriter

classdocs

Instance Methods [hide private]
 
__init__(self, data)
Constructor
source code
 
convert_to_xml(self, parallelsentences)
Creates an XML for the document an populates that with the (parallel) sentences of the given object.
source code
 
write_to_file(self, filename) source code
 
_create_xml_sentence(self, doc_xml, sentence, tag)
Helper function that fetches the text and the attributes of a sentence and wraps them up into a minidom XML sentenceect
source code

Inherited from xmlwriter.XmlWriter: get_parallelsentence_xml

Inherited from xmlwriter.GenericXMLWriter: get_document_xml, get_parallelsentence_string

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, data)
(Constructor)

source code 

Constructor

Overrides: object.__init__

convert_to_xml(self, parallelsentences)

source code 

Creates an XML for the document an populates that with the (parallel) sentences of the given object. Resulting XML object gets stored as a variable.

Parameters:
  • parallelsentences - a list of ParallelSentence objects

write_to_file(self, filename)

source code 
Overrides: xmlwriter.GenericWriter.write_to_file

_create_xml_sentence(self, doc_xml, sentence, tag)

source code 

Helper function that fetches the text and the attributes of a sentence and wraps them up into a minidom XML sentenceect

Overrides: xmlwriter.XmlWriter._create_xml_sentence