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:02 +0200
committerJulien Lepiller <julien@lepiller.eu>2023-04-01 16:38:16 +0200
commit4483296da3e2e1424d12d92d0f56fb428765ca43 (patch)
treee4e45e3af3173a59651935c4069100745a212705 /gnu/packages/language.scm
parent799abe85c53426b9ec4ae0244dc9e184e3bbc171 (diff)
downloadguix-4483296da3e2e1424d12d92d0f56fb428765ca43.tar.gz
gnu: Add mecab-unidic.
* gnu/packages/language.scm (mecab-unidic): 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 1f3d5a6cc8..208fab4f5b 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -28,6 +28,7 @@
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages emacs)
   #:use-module (gnu packages freedesktop)
@@ -58,6 +59,7 @@
   #:use-module (gnu packages xorg)
   #:use-module (guix packages)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
@@ -1004,3 +1006,28 @@ Corporation.  The engine is independent of any language, dictionary or corpus.")
     (description "This package contains dictionnary data derived from
 ipadic for use with MeCab.")
     (license (license:non-copyleft "mecab-ipadic/COPYING"))))
+
+(define-public mecab-unidic
+  (package
+    (name "mecab-unidic")
+    (version "3.1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://clrd.ninjal.ac.jp/unidic_archive/cwj/"
+                                  version "/unidic-cwj-" version ".zip"))
+              (sha256
+               (base32
+                "1z132p2q3bgchiw529j2d7dari21kn0fhkgrj3vcl0ncg2m521il"))))
+    (build-system copy-build-system)
+    (arguments
+     `(#:install-plan
+       '(("." "lib/mecab/dic"
+          #:include-regexp ("\\.bin$" "\\.def$" "\\.dic$" "dicrc")))))
+    (native-inputs (list unzip))
+    (home-page "https://clrd.ninjal.ac.jp/unidic/en/")
+    (synopsis "Dictionary data for MeCab")
+    (description "UniDic for morphological analysis is a dictionary for
+analysis with the morphological analyser MeCab, where the short units exported
+from the database are used as entries (heading terms).")
+    ;; triple-licensed (at the user’s choice)
+    (license (list license:gpl2+ license:lgpl2.1 license:bsd-3))))