diff options
| author | Nguyễn Gia Phong <cnx@loang.net> | 2026-01-12 15:24:48 +0900 |
|---|---|---|
| committer | Cayetano Santos <csantosb@inventati.org> | 2026-01-31 09:58:46 +0100 |
| commit | 819310310b532904692ec5dba0c0f2e883283a5b (patch) | |
| tree | c5a2843417bca52c2a486b99ed0dc4a50e694623 /gnu | |
| parent | f004a0629ef128c5cc13979e66a8c7d7cf81fa59 (diff) | |
gnu: Add python-argostranslate.
* gnu/packages/machine-learning.scm (python-argostranslate):
New variable.
Merges guix/guix!5564
Co-Authored-By: Lapearldot <lapearldot@disroot.org>
Change-Id: I59b5159b19cfea97cc4aa83a8ffb482066cc2b01
Signed-off-by: Cayetano Santos <csantosb@inventati.org>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/machine-learning.scm | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index f1e14d021ca..93dd307c5a2 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -103,6 +103,7 @@ #:use-module (gnu packages image-processing) #:use-module (gnu packages imagemagick) #:use-module (gnu packages jupyter) + #:use-module (gnu packages language) #:use-module (gnu packages libedit) #:use-module (gnu packages libevent) #:use-module (gnu packages libffi) @@ -6149,6 +6150,46 @@ models on CPU and GPU.") It includes a sentence boundary component of a relatively small size.") (license license:cc-by-sa3.0)))) +(define-public python-argostranslate + (package + (name "python-argostranslate") + (version "1.10.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/argosopentech/argos-translate") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "18fhqabdyh66ymri9xi9xc3q619f5bd3yb9izwhvwyladx65xcfn")))) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'writable-home + (lambda _ + ;; Tests want a writable home + (setenv "HOME" "/tmp")))))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest python-setuptools)) + (propagated-inputs (list python-ctranslate2 + python-packaging + python-sacremoses + python-sentencepiece + python-spacy + python-stanza + python-xx-sent-ud-sm)) + (home-page "https://www.argosopentech.com") + (synopsis "Offline translation library and CLI tool") + (description + "Argos Translate uses OpenNMT for translations and can be used +as either a Python library, command-line, or GUI application. +It supports installing language model packages which are ZIP archives +with a @code{.argosmodel} extension. This package provides +the Python library and the command-line program.") + (license license:expat))) + (define-public python-hmmlearn (package (name "python-hmmlearn") |
