Esempio n. 1
0
    def merge_from_xml_filename(self, filename):
        """**merge_from_xml_filename** (stream *stream*)

Loads the training data from the given filename and adds it to the
existing training data."""
        self._merge_xml(gamera_xml.LoadXML().parse_filename(filename))
Esempio n. 2
0
    def from_xml_filename(self, filename):
        """**from_xml_filename** (FileOpen *filename*)

Loads the training data from the given filename."""
        stream = gamera_xml.LoadXML().parse_filename(filename)
        self._from_xml(stream)
Esempio n. 3
0
    def merge_from_xml(self, stream):
        """**merge_from_xml** (stream *stream*)

Loads the training data from the given stream (which could be a file
handle or StringIO object) and adds it to the existing training data."""
        self._merge_xml(gamera_xml.LoadXML().parse_stream(stream))
Esempio n. 4
0
    def from_xml(self, stream):
        """**from_xml** (stream *stream*)

Loads the training data from the given stream (which could be any object 
supporting the file protocol, such as a file object or StringIO object.)"""
        self._from_xml(gamera_xml.LoadXML().parse_stream(stream))