| Conditions | 2 |
| Total Lines | 7 |
| Code Lines | 6 |
| Lines | 7 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | """Simple analyzer for Annif. Only folds words to lower case.""" |
||
| 22 | def tokenize_words(self, text): |
||
| 23 | lemmas = [lemma for lemma in (token.lemma_ for token in self.nlp(text)) |
||
| 24 | if self.is_valid_token(lemma)] |
||
| 25 | if self.lowercase: |
||
| 26 | return [lemma.lower() for lemma in lemmas] |
||
| 27 | else: |
||
| 28 | return lemmas |
||
| 29 | |||
| 37 |