Example #1
0
    def __init__(self, *args, **kwargs):
        if 'textid_file' in kwargs: self._textids = kwargs['textid_file']
        else: self._textids = None

        XMLCorpusReader.__init__(self, *args)
        CategorizedCorpusReader.__init__(self, kwargs)

        self._init_textids()
Example #2
0
	def __init__(self, *args, **kwargs):
		if 'textid_file' in kwargs: self._textids = kwargs['textid_file']
		else: self._textids = None

		XMLCorpusReader.__init__(self, *args)
		CategorizedCorpusReader.__init__(self, kwargs)
		
		self._init_textids()
Example #3
0
 def xml(self, fileids=None, categories=None):
     fileids, _ = self._resolve(fileids, categories)
     if len(fileids) == 1: return XMLCorpusReader.xml(self, fileids[0])
     else: raise TypeError('Expected a single file')
Example #4
0
 def __init__(self, root, fileids, lazy=True):
     XMLCorpusReader.__init__(self, root, fileids)
     self._lazy = lazy
Example #5
0
 def __init__(self, root, fileids, lazy=True):
     XMLCorpusReader.__init__(self, root, fileids)
     self._lazy = lazy
Example #6
0
	def xml(self, fileids=None, categories=None):
		fileids, _ = self._resolve(fileids, categories)
		if len(fileids) == 1: return XMLCorpusReader.xml(self, fileids[0])
		else: raise TypeError('Expected a single file')