Ejemplo n.º 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()
Ejemplo n.º 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()
Ejemplo n.º 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')
Ejemplo n.º 4
0
 def __init__(self, root, fileids, lazy=True):
     XMLCorpusReader.__init__(self, root, fileids)
     self._lazy = lazy
Ejemplo n.º 5
0
 def __init__(self, root, fileids, lazy=True):
     XMLCorpusReader.__init__(self, root, fileids)
     self._lazy = lazy
Ejemplo n.º 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')