Open pacien opened 1 year ago
The way argostranslate handles data files makes it really difficult to package. The only sane way to achieve this it to add support for this use-case to the upstream project, similarly to how whisper and whisper.cpp handles data files.
Project description
python3Packages.argostranslate
is an open-source offline translation library written in Python.It ships a handy command line tool for translating text. But prior to using the program or the library, one has to install language data (translation models) through the
argospm
command.It would be nicer to handle this through Nix as well, similarly Aspell and Hunspell dictionaries which are packaged in Nixpkgs.
There is a JSON package index here: https://raw.githubusercontent.com/argosopentech/argospm-index/main/index.json
The translation data directory can be set with the environment variable
ARGOS_PACKAGES_DIR
.So it might be feasible to make a wrapper package setting this path properly to use Nix-packaged translation language models.
Metadata
CC: @misuzu (maintainer of
python3Packages.argostranslate
)