diff mbox series

[bug#62443,2/3] gnu: Add python-sentencepiece.

Message ID 20230325153220.26027-2-ngraves@ngraves.fr
State New
Headers show
Series [bug#62443,1/3] gnu: Add sentencepiece. | expand

Commit Message

Nicolas Graves March 25, 2023, 3:32 p.m. UTC
* gnu/packages/machine-learning.scm (python-sentencepiece): New variable.
---
 gnu/packages/machine-learning.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index f6996af77b..df1989d316 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -610,6 +610,25 @@  (define-public sentencepiece
 that does not depend on language-specific pre/postprocessing.")
     (license license:asl2.0)))
 
+(define-public python-sentencepiece
+  (package
+    (name "python-sentencepiece")
+    (version "0.1.97")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "sentencepiece" version))
+       (sha256
+        (base32 "0v0z9ryl66432zajp099bcbnwkkldzlpjvgnjv9bq2vi19g300f9"))))
+    (build-system python-build-system)
+    (propagated-inputs (list sentencepiece))
+    (native-inputs (list pkg-config))
+    (home-page "https://github.com/google/sentencepiece")
+    (synopsis "SentencePiece python wrapper")
+    (description "This package provides a python wrapper for the SentencePiece
+unsupervised text tokenizer.")
+    (license license:asl2.0)))
+
 (define-public shogun
   (package
     (name "shogun")