[PATCH 0/3] Add apertium

  • Done
  • quality assurance status badge
Details
3 participants
  • Arun Isaac
  • Ludovic Courtès
  • swedebugia
Owner
unassigned
Submitted by
Arun Isaac
Severity
normal
A
A
Arun Isaac wrote on 28 Nov 2018 17:55
(address . guix-patches@gnu.org)(name . Arun Isaac)(address . arunisaac@systemreboot.net)
20181128165506.4580-1-arunisaac@systemreboot.net
This patchset adds apertium, the machine translation system.

Arun Isaac (3):
gnu: dictionaries: Use license prefix.
gnu: Add lttoolbox.
gnu: Add apertium.

gnu/packages/dictionaries.scm | 121 +++++++++++++++++++++++++++++++---
1 file changed, 113 insertions(+), 8 deletions(-)

--
2.19.1
S
S
swedebugia wrote on 30 Nov 2018 01:22
87a3e9ce-bbda-75e5-9510-507de1a909eb@riseup.net
On 2018-11-28 17:55, Arun Isaac wrote:
Toggle quote (11 lines)
> This patchset adds apertium, the machine translation system.
>
> Arun Isaac (3):
> gnu: dictionaries: Use license prefix.
> gnu: Add lttoolbox.
> gnu: Add apertium.
>
> gnu/packages/dictionaries.scm | 121 +++++++++++++++++++++++++++++++---
> 1 file changed, 113 insertions(+), 8 deletions(-)
>

Did you forget to send the patches?

--
Cheers Swedebugia
A
A
Arun Isaac wrote on 30 Nov 2018 08:12
cu7ftvj599o.fsf@systemreboot.net
Toggle quote (2 lines)
> Did you forget to send the patches?

I sent the patches. I don't know what happened, but it still doesn't
seem to have reached the debbugs bug tracker. I checked my email server
logs, and there didn't seem to be any problem. Anyways, I will resend
the patches.
A
A
Arun Isaac wrote on 30 Nov 2018 08:16
[PATCH 1/3] gnu: dictionaries: Use license prefix.
(address . 33540@debbugs.gnu.org)
20181130071612.6268-1-arunisaac@systemreboot.net
* gnu/packages/dictionaries.scm: Import (guix licenses) with license:
prefix. Fix all license fields.
---
gnu/packages/dictionaries.scm | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)

Toggle diff (75 lines)
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 3d58589e5..57aac87fc 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2017, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
+;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -22,7 +23,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages dictionaries)
- #:use-module (guix licenses)
+ #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
@@ -87,7 +88,7 @@
(description
"V.E.R.A. (Virtual Entity of Relevant Acronyms) is a list of computing
acronyms distributed as an info document.")
- (license fdl1.3+)))
+ (license license:fdl1.3+)))
(define-public gcide
(package
@@ -125,7 +126,7 @@ acronyms distributed as an info document.")
be used via the GNU Dico program or accessed online at
http://gcide.gnu.org.ua/")
(home-page "http://gcide.gnu.org.ua/")
- (license gpl3+)))
+ (license license:gpl3+)))
(define-public diction
;; Not quite a dictionary, not quite a spell checker either…
@@ -147,7 +148,7 @@ Diction is used to identify wordy and commonly misused phrases in a
body of text. Style instead analyzes surface aspects of a written
work, such as sentence length and other readability measures.")
(home-page "https://www.gnu.org/software/diction/")
- (license gpl3+)))
+ (license license:gpl3+)))
(define-public ding
(package
@@ -207,7 +208,7 @@ work, such as sentence length and other readability measures.")
(description "Ding is a dictionary lookup program for the X window system.
It comes with a German-English dictionary with approximately 270,000 entries.")
(home-page "http://www-user.tu-chemnitz.de/~fri/ding/")
- (license gpl2+)))
+ (license license:gpl2+)))
(define-public grammalecte
(package
@@ -234,7 +235,7 @@ a dubious expression is wrong, it will keep silent.
The package provides the command line interface, along with a server
and a Python library.")
- (license gpl3+)))
+ (license license:gpl3+)))
(define-public translate-shell
(package
@@ -283,4 +284,5 @@ and a Python library.")
translator powered by Google Translate (default), Bing Translator,
Yandex.Translate and Apertium. It gives you easy access to one of these
translation engines from your terminal.")
- (license public-domain)))
+ (license license:public-domain)))
+
--
2.19.1
A
A
Arun Isaac wrote on 30 Nov 2018 08:16
[PATCH 2/3] gnu: Add lttoolbox.
(address . 33540@debbugs.gnu.org)
20181130071612.6268-2-arunisaac@systemreboot.net
* gnu/packages/dictionaries.scm (lttoolbox): New variable.
---
gnu/packages/dictionaries.scm | 43 ++++++++++++++++++++++++++++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)

Toggle diff (68 lines)
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 57aac87fc..b97535979 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -30,15 +30,18 @@
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages curl)
#:use-module (gnu packages emacs)
#:use-module (gnu packages fribidi)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages pkg-config)
#:use-module (gnu packages readline)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages compression)
- #:use-module (gnu packages tcl))
+ #:use-module (gnu packages tcl)
+ #:use-module (gnu packages xml))
(define-public vera
@@ -286,3 +289,41 @@ Yandex.Translate and Apertium. It gives you easy access to one of these
translation engines from your terminal.")
(license license:public-domain)))
+(define-public lttoolbox
+ (package
+ (name "lttoolbox")
+ (version "3.5.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/apertium/lttoolbox/releases/download/v"
+ version "/lttoolbox-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0p8yjjyx1jqhxj8n5afmmhb55h4xg8gn2pysx0k2mnp8ic1hnzri"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("libxml2" ,libxml2)))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)
+ ("pkg-config" ,pkg-config)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-autogen
+ (lambda _
+ (substitute* "autogen.sh"
+ ((" && ./configure \"\\$@\"") ""))
+ #t)))))
+ (home-page "http://wiki.apertium.org/wiki/Lttoolbox")
+ (synopsis "Lexical processing toolbox")
+ (description "Lttoolbox is a toolbox for lexical processing, morphological
+analysis and generation of words. Analysis is the process of splitting a
+word (e.g. cats) into its lemma \"cat\" and the grammatical information
+<n><pl>. Generation is the opposite process.")
+ (license (list license:gpl2 ; main license
+ license:expat)))) ; utf8/*
--
2.19.1
A
A
Arun Isaac wrote on 30 Nov 2018 08:16
[PATCH 3/3] gnu: Add apertium.
(address . 33540@debbugs.gnu.org)
20181130071612.6268-3-arunisaac@systemreboot.net
* gnu/packages/dictionaries.scm (apertium): New variable.
---
gnu/packages/dictionaries.scm | 62 +++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)

Toggle diff (89 lines)
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index b97535979..28cce41d0 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -26,6 +26,7 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
@@ -34,9 +35,12 @@
#:use-module (gnu packages base)
#:use-module (gnu packages curl)
#:use-module (gnu packages emacs)
+ #:use-module (gnu packages flex)
#:use-module (gnu packages fribidi)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages pcre)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages python)
#:use-module (gnu packages readline)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages compression)
@@ -327,3 +331,61 @@ word (e.g. cats) into its lemma \"cat\" and the grammatical information
<n><pl>. Generation is the opposite process.")
(license (list license:gpl2 ; main license
license:expat)))) ; utf8/*
+
+(define-public apertium
+ (package
+ (name "apertium")
+ (version "3.5.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/apertium/apertium/releases/download/v"
+ version "/apertium-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0lrx58ipx2kzh1pd3xm1viz05dqyrq38jbnj9dnk92c9ckkwkp4h"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("libxml2" ,libxml2)
+ ("libxslt" ,libxslt)
+ ("lttoolbox" ,lttoolbox)
+ ("pcre" ,pcre)))
+ (native-inputs
+ `(("apertium-get"
+ ,(origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/apertium/apertium-get")
+ (commit "692d030e68008fc123089cf2446070fe8c6e3a3b")))
+ (sha256
+ (base32
+ "0kgp68azvds7yjwfz57z8sa5094fyk5yr0qxzblrw7bisrrihnav"))))
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("flex" ,flex)
+ ("libtool" ,libtool)
+ ("pkg-config" ,pkg-config)
+ ;; python is only required for running the test suite
+ ("python-minimal" ,python-minimal)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; If apertium-get does not exist in the source tree, the build tries
+ ;; to download it using an svn checkout. To avoid this, copy
+ ;; apertium-get into the source tree.
+ (add-after 'unpack 'unpack-apertium-get
+ (lambda* (#:key inputs #:allow-other-keys)
+ (copy-recursively (assoc-ref inputs "apertium-get")
+ "apertium/apertium-get")
+ #t)))))
+ (home-page "https://www.apertium.org/")
+ (synopsis "Rule based machine translation system")
+ (description "Apertium is a rule based machine translation system
+featuring a shallow-transfer machine translation engine. The design of the
+system makes translations fast (translating tens of thousands of words per
+second on ordinary desktop computers) and, in spite of the errors, reasonably
+intelligible and easily correctable.")
+ (license (list license:gpl2 ; main license
+ license:expat)))) ; utf8/*
--
2.19.1
L
L
Ludovic Courtès wrote on 2 Dec 2018 23:23
Re: [bug#33540] [PATCH 1/3] gnu: dictionaries: Use license prefix.
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 33540@debbugs.gnu.org)
874lbvlga9.fsf@gnu.org
Hello,

Arun Isaac <arunisaac@systemreboot.net> skribis:

Toggle quote (3 lines)
> * gnu/packages/dictionaries.scm: Import (guix licenses) with license:
> prefix. Fix all license fields.

LGTM!

Ludo’.
L
L
Ludovic Courtès wrote on 2 Dec 2018 23:26
Re: [bug#33540] [PATCH 2/3] gnu: Add lttoolbox.
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 33540@debbugs.gnu.org)
87y397k1ki.fsf@gnu.org
Arun Isaac <arunisaac@systemreboot.net> skribis:

Toggle quote (2 lines)
> * gnu/packages/dictionaries.scm (lttoolbox): New variable.

[...]

Toggle quote (6 lines)
> + (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://github.com/apertium/lttoolbox/releases/download/v"
> + version "/lttoolbox-" version ".tar.gz"))

Instead of relying on generated tarballs like this one whose content may
change over time, we’re now switching to using ‘git-fetch’. Could you
change this one accordingly?

Toggle quote (5 lines)
> + (add-after 'unpack 'patch-autogen
> + (lambda _
> + (substitute* "autogen.sh"
> + ((" && ./configure \"\\$@\"") ""))

Another option to deal with broken autogen.sh scripts is to remove
them. :-)

Toggle quote (6 lines)
> + (synopsis "Lexical processing toolbox")
> + (description "Lttoolbox is a toolbox for lexical processing, morphological
> +analysis and generation of words. Analysis is the process of splitting a
> +word (e.g. cats) into its lemma \"cat\" and the grammatical information
> +<n><pl>. Generation is the opposite process.")

Maybe @code{<n><pl>}.

OK with these changes, thanks!

Ludo’.
L
L
Ludovic Courtès wrote on 2 Dec 2018 23:28
Re: [bug#33540] [PATCH 3/3] gnu: Add apertium.
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 33540@debbugs.gnu.org)
87sgzfk1hi.fsf@gnu.org
Arun Isaac <arunisaac@systemreboot.net> skribis:

Toggle quote (2 lines)
> * gnu/packages/dictionaries.scm (apertium): New variable.

[...]

Toggle quote (6 lines)
> + (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://github.com/apertium/apertium/releases/download/v"
> + version "/apertium-" version ".tar.gz"))

Please use ‘git-fetch’ as well.

Toggle quote (11 lines)
> + (native-inputs
> + `(("apertium-get"
> + ,(origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/apertium/apertium-get")
> + (commit "692d030e68008fc123089cf2446070fe8c6e3a3b")))
> + (sha256
> + (base32
> + "0kgp68azvds7yjwfz57z8sa5094fyk5yr0qxzblrw7bisrrihnav"))))

Is there a Git submodule that would make this unnecessary?

Otherwise LGTM, thanks!

Ludo’.
A
A
Arun Isaac wrote on 3 Dec 2018 08:36
Re: [bug#33540] [PATCH 2/3] gnu: Add lttoolbox.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 33540@debbugs.gnu.org)
cu74lbvt62t.fsf@systemreboot.net
Toggle quote (10 lines)
>> + (origin
>> + (method url-fetch)
>> + (uri (string-append
>> + "https://github.com/apertium/lttoolbox/releases/download/v"
>> + version "/lttoolbox-" version ".tar.gz"))
>
> Instead of relying on generated tarballs like this one whose content may
> change over time, we’re now switching to using ‘git-fetch’. Could you
> change this one accordingly?

I don't think
is an autogenerated tarball. That is at
still switch to using git-fetch?

That said, I tried building lttoolbox again now, and the hash does seem
to have changed. I don't understand what's going on.

Toggle quote (2 lines)
> OK with these changes, thanks!

The other suggested changes are fine. I'll make them once we decide what
to do about the source tarball.
L
L
Ludovic Courtès wrote on 3 Dec 2018 10:36
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 33540@debbugs.gnu.org)
87ftvf7y0l.fsf@gnu.org
Arun Isaac <arunisaac@systemreboot.net> skribis:

Toggle quote (19 lines)
>>> + (origin
>>> + (method url-fetch)
>>> + (uri (string-append
>>> + "https://github.com/apertium/lttoolbox/releases/download/v"
>>> + version "/lttoolbox-" version ".tar.gz"))
>>
>> Instead of relying on generated tarballs like this one whose content may
>> change over time, we’re now switching to using ‘git-fetch’. Could you
>> change this one accordingly?
>
> I don't think
> https://github.com/apertium/apertium/releases/download/v3.5.2/apertium-3.5.2.tar.gz
> is an autogenerated tarball. That is at
> https://github.com/apertium/apertium/archive/v3.5.2.tar.gz . Should I
> still switch to using git-fetch?
>
> That said, I tried building lttoolbox again now, and the hash does seem
> to have changed. I don't understand what's going on.

Ouch. Indeed GitHub has an “asset” feature that some projects use,
which allows them to upload tarballs. You could use that (esp. since
the project uses the Autotools), except if it turns out to be modified
in place too often…

Ludo’.
A
A
Arun Isaac wrote on 3 Dec 2018 17:50
[PATCH v2 0/3] Add lttoolbox, apertium
(address . 33540@debbugs.gnu.org)
20181203165024.25334-1-arunisaac@systemreboot.net
I am using the release tarballs for both lttoolbox and apertium, since they
are the asset tarballs and not autogenerated ones. Also, it turns out that the
hash change of the lttoolbox tarball was due to a configure script being
added. Therefore the patch-autogen phase is no longer necessary.

Like you mentioned, apertium does have a submodule for apertium-get. But, we
cannot use it because we are using the release tarball.

The other suggested changes are not a problem. I have made them. The updated
patches follow. If there's nothing else, I'll push to master in 24 hours.

Arun Isaac (3):
gnu: dictionaries: Use license prefix.
gnu: Add lttoolbox.
gnu: Add apertium.

gnu/packages/dictionaries.scm | 107 +++++++++++++++++++++++++++++++---
1 file changed, 99 insertions(+), 8 deletions(-)

--
2.19.1
A
A
Arun Isaac wrote on 3 Dec 2018 17:50
[PATCH v2 1/3] gnu: dictionaries: Use license prefix.
(address . 33540@debbugs.gnu.org)
20181203165024.25334-2-arunisaac@systemreboot.net
* gnu/packages/dictionaries.scm: Import (guix licenses) with license:
prefix. Fix all license fields.
---
gnu/packages/dictionaries.scm | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)

Toggle diff (75 lines)
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 3d58589e5..57aac87fc 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2017, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
+;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -22,7 +23,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages dictionaries)
- #:use-module (guix licenses)
+ #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
@@ -87,7 +88,7 @@
(description
"V.E.R.A. (Virtual Entity of Relevant Acronyms) is a list of computing
acronyms distributed as an info document.")
- (license fdl1.3+)))
+ (license license:fdl1.3+)))
(define-public gcide
(package
@@ -125,7 +126,7 @@ acronyms distributed as an info document.")
be used via the GNU Dico program or accessed online at
http://gcide.gnu.org.ua/")
(home-page "http://gcide.gnu.org.ua/")
- (license gpl3+)))
+ (license license:gpl3+)))
(define-public diction
;; Not quite a dictionary, not quite a spell checker either…
@@ -147,7 +148,7 @@ Diction is used to identify wordy and commonly misused phrases in a
body of text. Style instead analyzes surface aspects of a written
work, such as sentence length and other readability measures.")
(home-page "https://www.gnu.org/software/diction/")
- (license gpl3+)))
+ (license license:gpl3+)))
(define-public ding
(package
@@ -207,7 +208,7 @@ work, such as sentence length and other readability measures.")
(description "Ding is a dictionary lookup program for the X window system.
It comes with a German-English dictionary with approximately 270,000 entries.")
(home-page "http://www-user.tu-chemnitz.de/~fri/ding/")
- (license gpl2+)))
+ (license license:gpl2+)))
(define-public grammalecte
(package
@@ -234,7 +235,7 @@ a dubious expression is wrong, it will keep silent.
The package provides the command line interface, along with a server
and a Python library.")
- (license gpl3+)))
+ (license license:gpl3+)))
(define-public translate-shell
(package
@@ -283,4 +284,5 @@ and a Python library.")
translator powered by Google Translate (default), Bing Translator,
Yandex.Translate and Apertium. It gives you easy access to one of these
translation engines from your terminal.")
- (license public-domain)))
+ (license license:public-domain)))
+
--
2.19.1
A
A
Arun Isaac wrote on 3 Dec 2018 17:50
[PATCH v2 2/3] gnu: Add lttoolbox.
(address . 33540@debbugs.gnu.org)
20181203165024.25334-3-arunisaac@systemreboot.net
* gnu/packages/dictionaries.scm (lttoolbox): New variable.
---
gnu/packages/dictionaries.scm | 32 +++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)

Toggle diff (57 lines)
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 57aac87fc..6f58eee0a 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -30,15 +30,18 @@
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages curl)
#:use-module (gnu packages emacs)
#:use-module (gnu packages fribidi)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages pkg-config)
#:use-module (gnu packages readline)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages compression)
- #:use-module (gnu packages tcl))
+ #:use-module (gnu packages tcl)
+ #:use-module (gnu packages xml))
(define-public vera
@@ -286,3 +289,30 @@ Yandex.Translate and Apertium. It gives you easy access to one of these
translation engines from your terminal.")
(license license:public-domain)))
+(define-public lttoolbox
+ (package
+ (name "lttoolbox")
+ (version "3.5.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/apertium/lttoolbox/releases/download/v"
+ version "/lttoolbox-" version ".tar.gz"))
+ (sha256
+ (base32
+ "08y6pf1hl7prwygy1g8h6ndqww18pmb9f3r5988q0pcrp8w6xz6b"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("libxml2" ,libxml2)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (home-page "http://wiki.apertium.org/wiki/Lttoolbox")
+ (synopsis "Lexical processing toolbox")
+ (description "Lttoolbox is a toolbox for lexical processing, morphological
+analysis and generation of words. Analysis is the process of splitting a
+word (e.g. cats) into its lemma \"cat\" and the grammatical information
+@code{<n><pl>}. Generation is the opposite process.")
+ (license (list license:gpl2 ; main license
+ license:expat)))) ; utf8/*
--
2.19.1
A
A
Arun Isaac wrote on 3 Dec 2018 17:50
[PATCH v2 3/3] gnu: Add apertium.
(address . 33540@debbugs.gnu.org)
20181203165024.25334-4-arunisaac@systemreboot.net
* gnu/packages/dictionaries.scm (apertium): New variable.
---
gnu/packages/dictionaries.scm | 59 +++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)

Toggle diff (86 lines)
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 6f58eee0a..039ec4596 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -26,6 +26,7 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
@@ -34,9 +35,12 @@
#:use-module (gnu packages base)
#:use-module (gnu packages curl)
#:use-module (gnu packages emacs)
+ #:use-module (gnu packages flex)
#:use-module (gnu packages fribidi)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages pcre)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages python)
#:use-module (gnu packages readline)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages compression)
@@ -316,3 +320,58 @@ word (e.g. cats) into its lemma \"cat\" and the grammatical information
@code{<n><pl>}. Generation is the opposite process.")
(license (list license:gpl2 ; main license
license:expat)))) ; utf8/*
+
+(define-public apertium
+ (package
+ (name "apertium")
+ (version "3.5.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/apertium/apertium/releases/download/v"
+ version "/apertium-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0lrx58ipx2kzh1pd3xm1viz05dqyrq38jbnj9dnk92c9ckkwkp4h"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("libxml2" ,libxml2)
+ ("libxslt" ,libxslt)
+ ("lttoolbox" ,lttoolbox)
+ ("pcre" ,pcre)))
+ (native-inputs
+ `(("apertium-get"
+ ,(origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/apertium/apertium-get")
+ (commit "692d030e68008fc123089cf2446070fe8c6e3a3b")))
+ (sha256
+ (base32
+ "0kgp68azvds7yjwfz57z8sa5094fyk5yr0qxzblrw7bisrrihnav"))))
+ ("flex" ,flex)
+ ("pkg-config" ,pkg-config)
+ ;; python is only required for running the test suite
+ ("python-minimal" ,python-minimal)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; If apertium-get does not exist in the source tree, the build tries
+ ;; to download it using an svn checkout. To avoid this, copy
+ ;; apertium-get into the source tree.
+ (add-after 'unpack 'unpack-apertium-get
+ (lambda* (#:key inputs #:allow-other-keys)
+ (copy-recursively (assoc-ref inputs "apertium-get")
+ "apertium/apertium-get")
+ #t)))))
+ (home-page "https://www.apertium.org/")
+ (synopsis "Rule based machine translation system")
+ (description "Apertium is a rule based machine translation system
+featuring a shallow-transfer machine translation engine. The design of the
+system makes translations fast (translating tens of thousands of words per
+second on ordinary desktop computers) and, in spite of the errors, reasonably
+intelligible and easily correctable.")
+ (license (list license:gpl2 ; main license
+ license:expat)))) ; utf8/*
--
2.19.1
L
L
Ludovic Courtès wrote on 4 Dec 2018 09:36
Re: [PATCH v2 0/3] Add lttoolbox, apertium
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 33540@debbugs.gnu.org)
878t158z8s.fsf@gnu.org
Arun Isaac <arunisaac@systemreboot.net> skribis:

Toggle quote (11 lines)
> I am using the release tarballs for both lttoolbox and apertium, since they
> are the asset tarballs and not autogenerated ones. Also, it turns out that the
> hash change of the lttoolbox tarball was due to a configure script being
> added. Therefore the patch-autogen phase is no longer necessary.
>
> Like you mentioned, apertium does have a submodule for apertium-get. But, we
> cannot use it because we are using the release tarball.
>
> The other suggested changes are not a problem. I have made them. The updated
> patches follow. If there's nothing else, I'll push to master in 24 hours.

Alright!

Thanks,
Ludo’.
A
A
Arun Isaac wrote on 4 Dec 2018 19:41
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 33540-done@debbugs.gnu.org)
cu7sgzdqglt.fsf@systemreboot.net
Pushed to master. Thanks for the review!
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 33540@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 33540
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch