ixa-ehu / ixa-pipe-pos

IXA pipes Part of Speech tagger and Lemmatizer (http://ixa2.si.ehu.es/ixa-pipes)
Apache License 2.0
17 stars 15 forks source link

Add property to disable in-memory model cache #6

Closed c-w closed 7 years ago

c-w commented 7 years ago

Currently, the part-of-speech and lemmatizer models get cached in memory after they've been read from disk. This can lead to very high memory usage, especially if we have a single process that handles requests for many different languages.

This pull request adds a property called useModelCache that lets users disable the in-memory caching to reduce the memory usage at the expense of reading more data from disk. By default, the property is enabled so that the public API doesn't change from the previous behavior.