| Conditions | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | """Dummy backend for testing basic interaction of projects and backends""" |
||
| 43 | def _learn( |
||
| 44 | self, |
||
| 45 | corpus: DocumentCorpus, |
||
| 46 | params: dict[str, Any], |
||
| 47 | ) -> None: |
||
| 48 | # in this dummy backend we "learn" by picking up the subject ID |
||
| 49 | # of the first subject of the first document in the learning set |
||
| 50 | # and using that in subsequent analysis results |
||
| 51 | for doc in corpus.documents: |
||
| 52 | if doc.subject_set: |
||
| 53 | self.subject_id = doc.subject_set[0] |
||
| 54 | break |
||
| 55 |