Package nltk :: Package corpus :: Package reader :: Module rte :: Class RTECorpusReader
[hide private]
[frames] | no frames]

Class RTECorpusReader

source code

         object --+        
                  |        
   api.CorpusReader --+    
                      |    
xmldocs.XMLCorpusReader --+
                          |
                         RTECorpusReader

Corpus reader for corpora in RTE challenges.

Instance Methods [hide private]
 
_read_etree(self, doc)
Build a list of RTE text/hypothesis pairs from the XML input.
source code
 
pairs(self, files=None)
Build a list of RTE pairs from a RTE corpus.
source code

Inherited from xmldocs.XMLCorpusReader: __init__, raw, xml

Inherited from api.CorpusReader: __repr__, abspath, abspaths, encoding, files, open

Inherited from api.CorpusReader (private): _get_root

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

    Deprecated since 0.8

Inherited from xmldocs.XMLCorpusReader: read

    Deprecated since 0.9.1

Inherited from api.CorpusReader: filenames

Inherited from api.CorpusReader (private): _get_items

Instance Variables [hide private]

Inherited from api.CorpusReader (private): _encoding, _files, _root

Properties [hide private]

Inherited from api.CorpusReader: root

Inherited from object: __class__

    Deprecated since 0.9.1

Inherited from api.CorpusReader: items

Method Details [hide private]

_read_etree(self, doc)

source code 

Build a list of RTE text/hypothesis pairs from the XML input.

Parameters:
  • doc - a parsed XML document
Returns:
a list of RTEPairs