Skip to content

Commit

Permalink
refactor code to avoid flake8 warning
Browse files Browse the repository at this point in the history
  • Loading branch information
osma committed Nov 12, 2024
1 parent a076607 commit d2a0051
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions annif/analyzer/estnltk.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ def tokenize_words(self, text: str, filter: bool = True) -> list[str]:

txt = estnltk.Text(text.strip())
txt.tag_layer()
lemmas = [
return [
lemma
for lemma in [l[0] for l in txt.lemma]
for lemma in [lemmas[0] for lemmas in txt.lemma]
if (not filter or self.is_valid_token(lemma))
]
return lemmas

0 comments on commit d2a0051

Please sign in to comment.