GNU logs - #56386, boring messages


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#56386] [PATCH] gnu: Add mecab.
Resent-From: Julien Lepiller <julien@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 04 Jul 2022 19:11:02 +0000
Resent-Message-ID: <handler.56386.B.165696184626440 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 56386
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 56386 <at> debbugs.gnu.org
X-Debbugs-Original-To: guix-patches@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.165696184626440
          (code B ref -1); Mon, 04 Jul 2022 19:11:02 +0000
Received: (at submit) by debbugs.gnu.org; 4 Jul 2022 19:10:46 +0000
Received: from localhost ([127.0.0.1]:48638 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o8RT4-0006sN-3b
	for submit <at> debbugs.gnu.org; Mon, 04 Jul 2022 15:10:46 -0400
Received: from lists.gnu.org ([209.51.188.17]:56204)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <julien@HIDDEN>) id 1o8RT1-0006sF-Ju
 for submit <at> debbugs.gnu.org; Mon, 04 Jul 2022 15:10:44 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39628)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <julien@HIDDEN>)
 id 1o8RT0-0007An-FF
 for guix-patches@HIDDEN; Mon, 04 Jul 2022 15:10:43 -0400
Received: from lepiller.eu ([2a00:5884:8208::1]:60290)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <julien@HIDDEN>)
 id 1o8RSy-0002U6-Fw
 for guix-patches@HIDDEN; Mon, 04 Jul 2022 15:10:42 -0400
Received: from lepiller.eu (localhost [127.0.0.1])
 by lepiller.eu (OpenSMTPD) with ESMTP id 12491894
 for <guix-patches@HIDDEN>; Mon, 4 Jul 2022 19:09:32 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from
 :to:subject:message-id:mime-version:content-type
 :content-transfer-encoding; s=dkim; bh=aOMMozTNou59dY8em1Uq/8w7o
 gO9Mwtt8oKHcLE+FmY=; b=g6UsIs8jOu3umSwjiamrrwal96J+BS0Xa/TRwPmYv
 AfwaVuzaWcOiuz8UFlV3hvlLKI50HMm+q+Gp2llp9mOm+jy8oqgKEN2hzfRn0flX
 7HwQ6EwLV9ZI978ta6K7SAeb2I5hsfuQ6SEbeDztFRWXk4kJyCu33ikBLmX+vsCA
 gPIerMm+gYzm21J+TN/cyXgC+N9yIJ3r4VTFqmAJDioSF/bhZr2/eh5cz7cSmYaH
 /pc4fQvmjUTNWwK8hNxkYC9ui9DrjdtScMaIbqvtpZ0yC6qlCmgFRg8H9Oxr82Jy
 sWRyWDYc8bIGwyJS5TMFt24hKkX3wH5zckHWle4e4eH/w==
Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id a026c21c
 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for <guix-patches@HIDDEN>;
 Mon, 4 Jul 2022 19:09:31 +0000 (UTC)
Date: Mon, 4 Jul 2022 21:09:30 +0200
From: Julien Lepiller <julien@HIDDEN>
Message-ID: <20220704210911.699b4697@HIDDEN>
X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=2a00:5884:8208::1;
 envelope-from=julien@HIDDEN; helo=lepiller.eu
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hi Guix!

This small series adds mecab and two dictionaries. MeCab is a
morphological analysis engine. I'm not sure what that previous sentence
means (:p) but I use it as a segmenter for Japanese in one of my
projects. In fact, the two patches that follow add two dictionary
sources. You need one of them in the same profile as mecab for it to be
useful (with no dictionaries, it segfaults).




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Julien Lepiller <julien@HIDDEN>
Subject: bug#56386: Acknowledgement ([PATCH] gnu: Add mecab.)
Message-ID: <handler.56386.B.165696184626440.ack <at> debbugs.gnu.org>
References: <20220704210911.699b4697@HIDDEN>
X-Gnu-PR-Message: ack 56386
X-Gnu-PR-Package: guix-patches
X-Gnu-PR-Keywords: patch
Reply-To: 56386 <at> debbugs.gnu.org
Date: Mon, 04 Jul 2022 19:11:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 guix-patches@HIDDEN

If you wish to submit further information on this problem, please
send it to 56386 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
56386: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D56386
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#56386] [PATCH 2/3] gnu: Add mecab-ipadic.
Resent-From: Julien Lepiller <julien@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 04 Jul 2022 19:43:01 +0000
Resent-Message-ID: <handler.56386.B56386.165696374430184 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 56386
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 56386 <at> debbugs.gnu.org
Received: via spool by 56386-submit <at> debbugs.gnu.org id=B56386.165696374430184
          (code B ref 56386); Mon, 04 Jul 2022 19:43:01 +0000
Received: (at 56386) by debbugs.gnu.org; 4 Jul 2022 19:42:24 +0000
Received: from localhost ([127.0.0.1]:48685 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o8Rxf-0007ql-OT
	for submit <at> debbugs.gnu.org; Mon, 04 Jul 2022 15:42:23 -0400
Received: from lepiller.eu ([89.234.186.109]:42874)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <julien@HIDDEN>) id 1o8Rxc-0007qQ-LJ
 for 56386 <at> debbugs.gnu.org; Mon, 04 Jul 2022 15:42:22 -0400
Received: from lepiller.eu (localhost [127.0.0.1])
 by lepiller.eu (OpenSMTPD) with ESMTP id 019231af
 for <56386 <at> debbugs.gnu.org>; Mon, 4 Jul 2022 19:42:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to
 :subject:date:message-id:in-reply-to:references:mime-version
 :content-transfer-encoding; s=dkim; bh=lM77AIhQyldn5m9zDy9V11YCo
 IE60qAQ4jbL53Azsig=; b=e2LoT5qGvu38lEVZhAdV5iwl4ZyNG03iXzMPXkrHF
 p26w0pQYT8IUuS4thDCMyi+g6De+iCITwf8O7cVGMMIAyOWRRmrmQYZKgEGfhdst
 5CmQV94PZdjg60WwZ+ER48xlcpxRQYjhuPmD7hJ5xA8qdrEQSKoFAZlHJw10JBky
 vCkrrNIJ6p6SbTGewwqr94vyWcPXx66O5DtpdyRScZ7NicUM7doIwfb4s5tDVMvt
 zz5ay36jkf0pZPv/G5Z4KE80hjrE+yil+7cpb0UQ3YOyR8UU24JCuj1+dv0icsxE
 DdgM7Hyu+MCrm3c6opXFRVzuel9nqxj3R2GPQ3J/YGcdw==
Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id cebe63b1
 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for <56386 <at> debbugs.gnu.org>;
 Mon, 4 Jul 2022 19:42:14 +0000 (UTC)
From: Julien Lepiller <julien@HIDDEN>
Date: Mon,  4 Jul 2022 21:42:01 +0200
Message-Id: <20220704194202.30958-2-julien@HIDDEN>
X-Mailer: git-send-email 2.36.1
In-Reply-To: <20220704194202.30958-1-julien@HIDDEN>
References: <20220704194202.30958-1-julien@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/language.scm (mecab-ipadic): New variable.
---
 gnu/packages/language.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index 3ffe115b51..63654c544b 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -970,3 +970,30 @@ (define-public mecab
 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"))))
-- 
2.36.1





Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#56386] [PATCH 1/3] gnu: Add mecab.
References: <20220704210911.699b4697@HIDDEN>
In-Reply-To: <20220704210911.699b4697@HIDDEN>
Resent-From: Julien Lepiller <julien@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 04 Jul 2022 19:43:02 +0000
Resent-Message-ID: <handler.56386.B56386.165696375030197 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 56386
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 56386 <at> debbugs.gnu.org
Received: via spool by 56386-submit <at> debbugs.gnu.org id=B56386.165696375030197
          (code B ref 56386); Mon, 04 Jul 2022 19:43:02 +0000
Received: (at 56386) by debbugs.gnu.org; 4 Jul 2022 19:42:30 +0000
Received: from localhost ([127.0.0.1]:48687 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o8Rxg-0007qn-0X
	for submit <at> debbugs.gnu.org; Mon, 04 Jul 2022 15:42:30 -0400
Received: from lepiller.eu ([89.234.186.109]:42872)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <julien@HIDDEN>) id 1o8RxZ-0007qI-9C
 for 56386 <at> debbugs.gnu.org; Mon, 04 Jul 2022 15:42:22 -0400
Received: from lepiller.eu (localhost [127.0.0.1])
 by lepiller.eu (OpenSMTPD) with ESMTP id 4663012b
 for <56386 <at> debbugs.gnu.org>; Mon, 4 Jul 2022 19:42:14 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to
 :subject:date:message-id:mime-version:content-type
 :content-transfer-encoding; s=dkim; bh=48aO4dvjfqaBnCWsMcTAX54LI
 x+MwOiBbW2jkfqqGOY=; b=dPcYDucOQ8gQliv2bQGwg0ZMuc3KmyKbdP545lSlh
 gtwEw8mds7RCTHQmncoS1sSe69K4WSTKgkHx/mXEBU3RCNQsEvFu5vmxy0Cyesjv
 bMc64Kt8OrwbpuiVkVowJ3o+dDNm14Fil6GWHl0eOD6b0RCn5eHEwbhkigqYyzh0
 j2T1wJAUNdg8ETCkfg244mbNndY9fTYKQfV9MpPrWc85lABAe/QPcFCY0ILFoBm/
 qyOv5v1k4U9bN/OI4j/0k8a1MTcBBBy+iTwWqpsf7DyDO7LeEAOoeaHVccAMccJv
 z91w5npqFHa7HjPBPZiD4DUkFIxOXeB7W3PGTy+IQo5RQ==
Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 4273e627
 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for <56386 <at> debbugs.gnu.org>;
 Mon, 4 Jul 2022 19:42:14 +0000 (UTC)
From: Julien Lepiller <julien@HIDDEN>
Date: Mon,  4 Jul 2022 21:42:00 +0200
Message-Id: <20220704194202.30958-1-julien@HIDDEN>
X-Mailer: git-send-email 2.36.1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/language.scm (mecab): New variable.
* gnu/packages/patches/mecab-variable-param.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/language.scm                     | 51 ++++++++++++++++++-
 .../patches/mecab-variable-param.patch        | 30 +++++++++++
 3 files changed, 81 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/mecab-variable-param.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index faad6cc6b2..87fe75082c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1490,6 +1490,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/libmemcached-build-with-gcc7.patch	\
   %D%/packages/patches/libmhash-hmac-fix-uaf.patch		\
   %D%/packages/patches/libsigrokdecode-python3.9-fix.patch	\
+  %D%/packages/patches/mecab-variable-param.patch		\
   %D%/packages/patches/mercurial-hg-extension-path.patch       \
   %D%/packages/patches/mesa-opencl-all-targets.patch		\
   %D%/packages/patches/mesa-skip-tests.patch			\
diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index 61c9e682ed..3ffe115b51 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -4,7 +4,7 @@
 ;;; Copyright © 2018 Nikita <nikita@HIDDEN>
 ;;; Copyright © 2019 Alex Vong <alexvong1995@HIDDEN>
 ;;; Copyright © 2020 Ricardo Wurmus <rekado@HIDDEN>
-;;; Copyright © 2020 Julien Lepiller <julien@HIDDEN>
+;;; Copyright © 2020, 2022 Julien Lepiller <julien@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -921,3 +921,52 @@ (define-public praat
 analysis (pitch, formant, intensity, ...), speech synthesis, labelling, segmenting
 and manipulation.")
     (license license:gpl2+)))
+
+(define-public mecab
+  (package
+    (name "mecab")
+    (version "0.996")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/taku910/mecab")
+                     ;; latest commit
+                     (commit "046fa78b2ed56fbd4fac312040f6d62fc1bc31e3")))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1hdv7rgn8j0ym9gsbigydwrbxa8cx2fb0qngg1ya15vvbw0lk4aa"))
+              (patches
+                (search-patches
+                  "mecab-variable-param.patch"))))
+    (build-system gnu-build-system)
+    (native-search-paths
+      (list (search-path-specification
+              (variable "MECAB_DICDIR")
+              (separator #f)
+              (files '("lib/mecab/dic")))))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'chdir
+           (lambda _
+             (chdir "mecab")))
+         (add-before 'build 'add-mecab-dicdir-variable
+           (lambda _
+             (substitute* "mecabrc.in"
+               (("dicdir = .*")
+                "dicdir = $MECAB_DICDIR"))
+             (substitute* "mecab-config.in"
+               (("echo @libdir@/mecab/dic")
+                "if [ -z \"$MECAB_DICDIR\" ]; then
+  echo @libdir@/mecab/dic
+else
+  echo \"$MECAB_DICDIR\"
+fi")))))))
+    (inputs (list libiconv))
+    (home-page "https://taku910.github.io/mecab")
+    (synopsis "Morphological analysis engine for texts")
+    (description "Mecab is a morphological analysis engine developped as a
+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))))
diff --git a/gnu/packages/patches/mecab-variable-param.patch b/gnu/packages/patches/mecab-variable-param.patch
new file mode 100644
index 0000000000..4457cf3f44
--- /dev/null
+++ b/gnu/packages/patches/mecab-variable-param.patch
@@ -0,0 +1,30 @@
+From 2396e90056706ef897acab3aaa081289c7336483 Mon Sep 17 00:00:00 2001
+From: LEPILLER Julien <julien.lepiller@HIDDEN>
+Date: Fri, 19 Apr 2019 11:48:39 +0200
+Subject: [PATCH] Allow variable parameters
+
+---
+ mecab/src/param.cpp | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/mecab/src/param.cpp b/mecab/src/param.cpp
+index 65328a2..006b1b5 100644
+--- a/mecab/src/param.cpp
++++ b/mecab/src/param.cpp
+@@ -79,8 +79,12 @@ bool Param::load(const char *filename) {
+     size_t s1, s2;
+     for (s1 = pos+1; s1 < line.size() && isspace(line[s1]); s1++);
+     for (s2 = pos-1; static_cast<long>(s2) >= 0 && isspace(line[s2]); s2--);
+-    const std::string value = line.substr(s1, line.size() - s1);
++    std::string value = line.substr(s1, line.size() - s1);
+     const std::string key   = line.substr(0, s2 + 1);
++
++    if(value.find('$') == 0) {
++        value = std::getenv(value.substr(1).c_str());
++    }
+     set<std::string>(key.c_str(), value, false);
+   }
+ 
+-- 
+2.20.1
+
-- 
2.36.1





Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#56386] [PATCH 3/3] gnu: Add mecab-unidic.
Resent-From: Julien Lepiller <julien@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 04 Jul 2022 19:43:02 +0000
Resent-Message-ID: <handler.56386.B56386.165696375130204 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 56386
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 56386 <at> debbugs.gnu.org
Received: via spool by 56386-submit <at> debbugs.gnu.org id=B56386.165696375130204
          (code B ref 56386); Mon, 04 Jul 2022 19:43:02 +0000
Received: (at 56386) by debbugs.gnu.org; 4 Jul 2022 19:42:31 +0000
Received: from localhost ([127.0.0.1]:48689 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o8Rxm-0007r0-Lp
	for submit <at> debbugs.gnu.org; Mon, 04 Jul 2022 15:42:30 -0400
Received: from lepiller.eu ([89.234.186.109]:42874)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <julien@HIDDEN>) id 1o8Rxe-0007qQ-QS
 for 56386 <at> debbugs.gnu.org; Mon, 04 Jul 2022 15:42:23 -0400
Received: from lepiller.eu (localhost [127.0.0.1])
 by lepiller.eu (OpenSMTPD) with ESMTP id e4284eb2
 for <56386 <at> debbugs.gnu.org>; Mon, 4 Jul 2022 19:42:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to
 :subject:date:message-id:in-reply-to:references:mime-version
 :content-transfer-encoding; s=dkim; bh=ozRQurRJvGKaK9p9OKjiDK2TW
 oWOj/ixDSOtLZyJqWs=; b=Y4KD1mYnG0jMKuHqGoCmIOkhGBnCM0K+GQZE5K4ua
 4kQiq59eWi7y/gjRZU2YKUagThexZgNvtrZceMm1nvFUMXG3DDldcyR1KpjqRnRk
 iIWfG2no15Sq0kz9NtBJ/wgAGvOeqiWMaCEVnLYtjGREEu8tcgEFBCzzSsTO6TRr
 7eoTjzEBYwXKpsr/raCmft12QOxOB5XbQjcIFO11eQOBwrqjiA5av5U7J9Tb0xkZ
 baG1f3oAcUcNWyny50Ijp13NYjZFDYazdqvpPj6uP8j8I9IprepXKY78CQOyQKdP
 /lgRjCN2fnt8ElbRbZ/kY/DXo91wjDBImd1jjtFG0eQBA==
Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 6009996d
 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for <56386 <at> debbugs.gnu.org>;
 Mon, 4 Jul 2022 19:42:14 +0000 (UTC)
From: Julien Lepiller <julien@HIDDEN>
Date: Mon,  4 Jul 2022 21:42:02 +0200
Message-Id: <20220704194202.30958-3-julien@HIDDEN>
X-Mailer: git-send-email 2.36.1
In-Reply-To: <20220704194202.30958-1-julien@HIDDEN>
References: <20220704194202.30958-1-julien@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/language.scm (mecab-unidic): New variable.
---
 gnu/packages/language.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index 63654c544b..f97b982cb9 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -27,6 +27,7 @@ (define-module (gnu packages language)
   #: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)
@@ -57,6 +58,7 @@ (define-module (gnu packages language)
   #: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)
@@ -997,3 +999,27 @@ (define-public mecab-ipadic
     (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).")
+    (license (list license:gpl2+ license:lgpl2.1 license:bsd-3))))
-- 
2.36.1





Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#56386] [PATCH] gnu: Add mecab.
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Sun, 17 Jul 2022 19:34:02 +0000
Resent-Message-ID: <handler.56386.B56386.165808641126098 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 56386
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Julien Lepiller <julien@HIDDEN>
Cc: 56386 <at> debbugs.gnu.org
Received: via spool by 56386-submit <at> debbugs.gnu.org id=B56386.165808641126098
          (code B ref 56386); Sun, 17 Jul 2022 19:34:02 +0000
Received: (at 56386) by debbugs.gnu.org; 17 Jul 2022 19:33:31 +0000
Received: from localhost ([127.0.0.1]:48591 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oDA1C-0006mr-Nv
	for submit <at> debbugs.gnu.org; Sun, 17 Jul 2022 15:33:30 -0400
Received: from eggs.gnu.org ([209.51.188.92]:48398)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1oDA1A-0006ma-9y
 for 56386 <at> debbugs.gnu.org; Sun, 17 Jul 2022 15:33:28 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49778)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1oDA14-0001nd-W5; Sun, 17 Jul 2022 15:33:23 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=7zW1+LDWkUlBDcUmTf246UiD/5XvZPS6n6AYwbF6oUQ=; b=psDkOoTg4C1DVQUSA54E
 4zuyRrCDnFIQifSxQ9oeurWIChrQDhUSaDt2zI3GRb2CIkJpnS36q2iKcevL6dKkNIcJRF0Co08GM
 q2p8UISlQGfjuKaP9t9nR8Bqg5WLIzo9p7jRDL0dvZTF8FnZV9C49EuVbrAjxsTSgrnWX6suEcV1V
 maXArTcIeeS2aTXygNDSNGWshxlw0UV97aLgFF4We580+Xh7ltKKhMGtOrqZZrvA2DUpRhsJtVsLN
 TBEYuTZKleKdsAKCoNFEUNO4ODLBHUlxnGopP2ebwuFNrGbiTIvuPetreBr8KGE3nv0PnbPYkmRkl
 IFTSZ+mc7vfgyQ==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:60998
 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1oDA14-0005n8-Jd; Sun, 17 Jul 2022 15:33:22 -0400
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
References: <20220704194202.30958-1-julien@HIDDEN>
 <20220704194202.30958-3-julien@HIDDEN>
Date: Sun, 17 Jul 2022 21:33:21 +0200
In-Reply-To: <20220704194202.30958-3-julien@HIDDEN> (Julien Lepiller's
 message of "Mon, 4 Jul 2022 21:42:02 +0200")
Message-ID: <87a6974jr2.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Julien Lepiller <julien@HIDDEN> skribis:

> +    (synopsis "Dictionary data for MeCab")
> +    (description "UniDic for morphological analysis is a dictionary for
> +analysis with the morphological analyser MeCab, where the short units ex=
ported
> +from the database are used as entries (heading terms).")
> +    (license (list license:gpl2+ license:lgpl2.1 license:bsd-3))))

Maybe add a comment stating whether this is triple-licensed (at the
user=E2=80=99s choice) or if that means that there are files under each of
these.

Otherwise the whole series LGTM!

Ludo=E2=80=99.





Last modified: Sun, 17 Jul 2022 19:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.