How to Use Catalyst for Lemmatizing in a Multi-Language App with On-Demand Model Downloads
I'm working on an application that supports multiple languages chosen by the user. I want to integrate Catalyst for its lemmatizing capabilities. However, I've encountered a couple of challenges and I would appreciate your guidance on how to address them:
Challenges
-
Preinstallation of NuGet Packages for Each Language: As per the documentation, it appears that I need to preinstall the NuGet package for each language I intend to support. Given the number of languages, this approach would lead to a significant increase in the bundle size of my application, which is not ideal.
-
Using Only the Lemmatizing Feature: My primary need from Catalyst is the lemmatizing feature. I want to minimize the resources and dependencies required by my application by using only this specific functionality.
Questions
-
On-Demand Model Downloads: Is there a way to implement Catalyst such that I can download language models on demand, based on the user's selected language? This would help in keeping the initial bundle size small and load models only when necessary.
-
Minimal Usage for Lemmatizing: How can I configure Catalyst to use just enough resources for the lemmatizing feature? Are there any specific configurations or optimizations that I should be aware of to achieve this?
Use Case
Here is a brief outline of what I am trying to achieve:
- The user selects a language.
- The application downloads the necessary model for that language.
- The application uses Catalyst's lemmatizing feature for processing text in the chosen language.
Any advice, code snippets, or references to relevant parts of the documentation would be highly appreciated.