| Conditions | 3 |
| Total Lines | 12 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | """Class for combining multiple corpora so they behave like a single corpus""" |
||
| 14 | @property |
||
| 15 | def documents(self): |
||
| 16 | return itertools.chain.from_iterable( |
||
| 17 | [corpus.documents for corpus in self._corpora]) |
||
| 18 | |||
| 19 | def set_subject_index(self, subject_index): |
||
| 20 | """Set a subject index for looking up labels that are necessary for |
||
| 21 | conversion""" |
||
| 22 | |||
| 23 | for corpus in self._corpora: |
||
| 24 | if hasattr(corpus, 'set_subject_index'): |
||
| 25 | corpus.set_subject_index(subject_index) |
||
| 26 |