Skip to content

Commit

Permalink
Merge pull request #618 from NatLibFi/issue617-simplemma-0.8-remove-c…
Browse files Browse the repository at this point in the history
…ache

upgrade to simplemma 0.8 and disable unnecessary cache
  • Loading branch information
osma authored Sep 1, 2022
2 parents dea7d51 + d4abfa4 commit f632673
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 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)
return simplemma.lemmatize(word, lang=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 f632673

Please sign in to comment.