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""" |
||
42 | def _learn( |
||
43 | self, |
||
44 | corpus: DocumentCorpus, |
||
45 | params: dict[str, Any], |
||
46 | ) -> None: |
||
47 | # in this dummy backend we "learn" by picking up the subject ID |
||
48 | # of the first subject of the first document in the learning set |
||
49 | # and using that in subsequent analysis results |
||
50 | for doc in corpus.documents: |
||
51 | if doc.subject_set: |
||
52 | self.subject_id = doc.subject_set[0] |
||
53 | break |
||
54 |