| Conditions | 2 |
| Total Lines | 8 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | """Parallel processing functionality for Annif""" |
||
| 26 | def suggest(self, doc): |
||
| 27 | filtered_hits = {} |
||
| 28 | for project_id in self.project_ids: |
||
| 29 | project = self.registry.get_project(project_id) |
||
| 30 | hits = project.suggest(doc.text, self.backend_params) |
||
| 31 | filtered_hits[project_id] = hits.filter( |
||
| 32 | project.subjects, self.limit, self.threshold) |
||
| 33 | return (filtered_hits, doc.uris, doc.labels) |
||
| 34 | |||
| 50 |