| Conditions | 1 |
| Total Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | """Backend that returns most similar subjects based on similarity in sparse |
||
| 34 | def load_subjects(self, subjects, analyzer): |
||
| 35 | corpus = subjects.tokens(analyzer) |
||
| 36 | dictionary = gensim.corpora.Dictionary(corpus) |
||
| 37 | self._atomic_save(dictionary, self._get_datadir(), 'dictionary') |
||
| 38 | veccorpus = VectorCorpus(corpus, dictionary) |
||
| 39 | tfidf = gensim.models.TfidfModel(veccorpus) |
||
| 40 | self._atomic_save(tfidf, self._get_datadir(), 'tfidf') |
||
| 41 | |||
| 44 |