Skip to content

Commit

Permalink
upgrade to simplemma 0.8 and disable unnecessary cache. Fixes #617
Browse files Browse the repository at this point in the history
  • Loading branch information
osma committed Sep 1, 2022
1 parent dea7d51 commit da70c21
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions annif/analyzer/simplemma.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Simplemma analyzer for Annif, based on simplemma lemmatizer."""

import functools
import simplemma
from . import analyzer

Expand All @@ -12,6 +11,5 @@ def __init__(self, param, **kwargs):
self.lang = param
super().__init__(**kwargs)

@functools.lru_cache(maxsize=500000)
def _normalize_word(self, word):
return simplemma.lemmatize(word, self.lang)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def read(fname):
'stwfsapy==0.3.*',
'python-dateutil',
'tomli==2.0.*',
'simplemma==0.7.*'
'simplemma==0.8.*'
],
tests_require=['py', 'pytest', 'requests'],
extras_require={
Expand Down

0 comments on commit da70c21

Please sign in to comment.