[bug#76746,v2,07/13] gnu: Add python-pykakasi.

Message ID f00fda448996522d86426fd3b699f0712b826a87.1741702572.git.45mg.writes@gmail.com
State New
Headers
Series None |

Commit Message

45mg March 11, 2025, 2:23 p.m. UTC
  * gnu/packages/python-xyz.scm (python-pykakasi): New variable.

Change-Id: I127cc34f58d4f8df737f878499c448d969c9a831
---
 gnu/packages/python-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
  

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4b35f11eec..de9b5c1a49 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -34521,6 +34521,42 @@  (define-public python-jaconv
 Katakana, Hankaku (half-width character) and Zenkaku (full-width character)")
     (license license:expat)))
 
+(define-public python-pykakasi
+  (package
+    (name "python-pykakasi")
+    (version "2.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pykakasi" version))
+       (sha256
+        (base32 "18dhcw7myw5idajnfynjbvqxmyf9m0cygfwsavbbi7zmcf72l1gs"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:test-flags '(list "-k"
+                          (string-append
+                           ;; Disable benchmarks.
+                           "not test_benchmark"
+                           " and not pytest_benchmark_update_machine_info"
+                           " and not pytest_benchmark_update_json"
+                           ;; Fails with AssertionError
+                           " and not test_aozora"))))
+    (propagated-inputs (list python-jaconv python-deprecated))
+    (native-inputs (list python-py-cpuinfo
+                         python-pytest
+                         python-pytest-benchmark
+                         python-setuptools
+                         python-setuptools-scm
+                         python-wheel))
+    (home-page "https://codeberg.org/miurahr/pykakasi")
+    (synopsis "Convert Japanese Kana-kanji sentences into Kana-Roman")
+    (description
+     "This is a Python Natural Language Processing (NLP) library to
+transliterate hiragana, katakana and kanji (Japanese text) into
+rōmaji (Latin/Roman alphabet). It can handle characters in NFC form.")
+    (license license:gpl2)))
+
 (define-public python-flufl-lock
   (package
     (name "python-flufl-lock")