| Conditions | 4 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | """Dummy backend for testing basic interaction of projects and backends""" |
||
| 24 | def learn(self, corpus, project): |
||
| 25 | # in this dummy backend we "learn" by picking up the URI and label |
||
| 26 | # of the first subject of the first document in the learning set |
||
| 27 | # and using that in subsequent analysis results |
||
| 28 | for doc in corpus.documents: |
||
| 29 | if doc.uris and doc.labels: |
||
| 30 | self.uri = list(doc.uris)[0] |
||
| 31 | self.label = list(doc.labels)[0] |
||
| 32 | break |
||
| 33 |