summary refs log tree commit diff
path: root/gnu/packages/language.scm
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2022-07-04 21:42:01 +0200
committerJulien Lepiller <julien@lepiller.eu>2023-04-01 16:38:14 +0200
commit799abe85c53426b9ec4ae0244dc9e184e3bbc171 (patch)
treecdb1ce1a65ffba5fd88ef16833b9f9416ecc6e20 /gnu/packages/language.scm
parent3ab24ba216ce91210b93ec61554b3343fbc3aaab (diff)
downloadguix-799abe85c53426b9ec4ae0244dc9e184e3bbc171.tar.gz
gnu: Add mecab-ipadic.
* gnu/packages/language.scm (mecab-ipadic): New variable.
Diffstat (limited to 'gnu/packages/language.scm')
-rw-r--r--gnu/packages/language.scm27
1 files changed, 27 insertions, 0 deletions
diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index 5dda0c1eeb..1f3d5a6cc8 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -977,3 +977,30 @@ fi")))))))
 collaboration between the Kyoto university and Nippon Telegraph and Telephone
 Corporation.  The engine is independent of any language, dictionary or corpus.")
     (license (list license:gpl2+ license:lgpl2.1+ license:bsd-3))))
+
+(define-public mecab-ipadic
+  (package
+    (name "mecab-ipadic")
+    (version "2.7.0")
+    (source (package-source mecab))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list (string-append "--with-dicdir=" (assoc-ref %outputs "out")
+                            "/lib/mecab/dic")
+             "--with-charset=utf8")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'chdir
+           (lambda _
+             (chdir "mecab-ipadic")))
+         (add-before 'configure 'set-mecab-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (setenv "MECAB_DICDIR" (string-append (assoc-ref outputs "out")
+                                                   "/lib/mecab/dic")))))))
+    (native-inputs (list mecab)); for mecab-config
+    (home-page "https://taku910.github.io/mecab")
+    (synopsis "Dictionary data for MeCab")
+    (description "This package contains dictionnary data derived from
+ipadic for use with MeCab.")
+    (license (license:non-copyleft "mecab-ipadic/COPYING"))))