Commit | Line | Data |
---|---|---|
fc436dba | 1 | ;;; GNU Guix --- Functional package management for GNU |
a2190ccc | 2 | ;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org> |
b4fb61f6 | 3 | ;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
3c986a7d | 4 | ;;; Copyright © 2018 Nikita <nikita@n0.is> |
410387ad | 5 | ;;; Copyright © 2019 Alex Vong <alexvong1995@gmail.com> |
1f6f0b6b | 6 | ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net> |
fa76fb63 | 7 | ;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu> |
fc436dba EB |
8 | ;;; |
9 | ;;; This file is part of GNU Guix. | |
10 | ;;; | |
11 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
12 | ;;; under the terms of the GNU General Public License as published by | |
13 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
14 | ;;; your option) any later version. | |
15 | ;;; | |
16 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
17 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | ;;; GNU General Public License for more details. | |
20 | ;;; | |
21 | ;;; You should have received a copy of the GNU General Public License | |
22 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
23 | ||
24 | (define-module (gnu packages language) | |
25 | #:use-module (gnu packages) | |
677cb21b | 26 | #:use-module (gnu packages anthy) |
899784fb | 27 | #:use-module (gnu packages autotools) |
fa76fb63 | 28 | #:use-module (gnu packages audio) |
83299e54 RG |
29 | #:use-module (gnu packages base) |
30 | #:use-module (gnu packages docbook) | |
31 | #:use-module (gnu packages emacs) | |
677cb21b RG |
32 | #:use-module (gnu packages freedesktop) |
33 | #:use-module (gnu packages gettext) | |
410387ad | 34 | #:use-module (gnu packages glib) |
83299e54 | 35 | #:use-module (gnu packages gnome) |
58ac9289 | 36 | #:use-module (gnu packages gtk) |
83299e54 | 37 | #:use-module (gnu packages ibus) |
8205fe44 | 38 | #:use-module (gnu packages java) |
fa76fb63 | 39 | #:use-module (gnu packages linux) |
899784fb RG |
40 | #:use-module (gnu packages llvm) |
41 | #:use-module (gnu packages man) | |
823b27d9 | 42 | #:use-module (gnu packages ncurses) |
c2810523 | 43 | #:use-module (gnu packages ocr) |
fc436dba | 44 | #:use-module (gnu packages perl) |
410387ad | 45 | #:use-module (gnu packages pkg-config) |
fa76fb63 | 46 | #:use-module (gnu packages pulseaudio) |
410387ad | 47 | #:use-module (gnu packages python) |
5ccde207 | 48 | #:use-module (gnu packages perl-check) |
677cb21b | 49 | #:use-module (gnu packages qt) |
823b27d9 | 50 | #:use-module (gnu packages sqlite) |
410387ad | 51 | #:use-module (gnu packages swig) |
899784fb | 52 | #:use-module (gnu packages texinfo) |
d7de0883 | 53 | #:use-module (gnu packages web) |
8205fe44 | 54 | #:use-module (gnu packages xml) |
83299e54 | 55 | #:use-module (gnu packages xdisorg) |
58ac9289 | 56 | #:use-module (gnu packages xorg) |
fc436dba | 57 | #:use-module (guix packages) |
677cb21b RG |
58 | #:use-module (guix build-system cmake) |
59 | #:use-module (guix build-system glib-or-gtk) | |
3ed30b88 | 60 | #:use-module (guix build-system gnu) |
fc436dba | 61 | #:use-module (guix build-system perl) |
410387ad | 62 | #:use-module (guix build-system python) |
677cb21b | 63 | #:use-module (guix build-system qt) |
cfcf9dea | 64 | #:use-module ((guix licenses) #:prefix license:) |
c2810523 | 65 | #:use-module (guix download) |
e4f72a58 | 66 | #:use-module (guix git-download) |
c2810523 | 67 | #:use-module (guix utils)) |
fc436dba | 68 | |
83299e54 RG |
69 | (define-public nimf |
70 | (package | |
71 | (name "nimf") | |
72 | (version "1.2") | |
73 | (source | |
74 | (origin | |
75 | (method git-fetch) | |
76 | (uri | |
77 | (git-reference | |
78 | (url "https://github.com/hamonikr/nimf.git") | |
79 | (commit | |
80 | (string-append "nimf-" version)))) | |
81 | (file-name | |
82 | (git-file-name name version)) | |
83 | (sha256 | |
84 | (base32 "01qi7flmaqrn2fk03sa42r0caks9d8lsv88s0bgxahhxwk1x76gc")))) | |
85 | (build-system glib-or-gtk-build-system) | |
2e9fe98a | 86 | (outputs '("out" "gtk" "qt" "doc")) |
83299e54 RG |
87 | (arguments |
88 | `(#:imported-modules | |
89 | (,@%glib-or-gtk-build-system-modules | |
90 | (guix build cmake-build-system) | |
91 | (guix build qt-build-system)) | |
92 | #:modules | |
93 | ((guix build glib-or-gtk-build-system) | |
94 | ((guix build qt-build-system) | |
95 | #:prefix qt:) | |
96 | (guix build utils)) | |
97 | #:configure-flags | |
98 | (list | |
99 | "--with-im-config-data" | |
100 | "--with-imsettings-data" | |
101 | (string-append "--with-html-dir=" | |
102 | (assoc-ref %outputs "doc") | |
103 | "/share/gtk-doc/html")) | |
104 | #:phases | |
105 | (modify-phases %standard-phases | |
76c32fca RG |
106 | (add-after 'unpack 'disable-qt4 |
107 | (lambda _ | |
108 | (substitute* '("configure.ac" "modules/clients/Makefile.am") | |
109 | (("\\[QtGui\\]") | |
110 | "[Qt5Gui]") | |
111 | ((" qt4") | |
112 | "")) | |
113 | #t)) | |
114 | (add-after 'disable-qt4 'patch-flags | |
83299e54 RG |
115 | (lambda* (#:key inputs #:allow-other-keys) |
116 | (substitute* "configure.ac" | |
117 | (("-Werror") | |
118 | "-Wno-error")) | |
119 | #t)) | |
120 | (add-after 'patch-flags 'patch-docbook-xml | |
121 | (lambda* (#:key inputs #:allow-other-keys) | |
122 | (with-directory-excursion "docs" | |
123 | (substitute* "nimf-docs.xml" | |
124 | (("http://www.oasis-open.org/docbook/xml/4.3/") | |
125 | (string-append (assoc-ref inputs "docbook-xml-4.3") | |
126 | "/xml/dtd/docbook/")))) | |
127 | #t)) | |
128 | (add-after 'patch-docbook-xml 'patch-paths | |
129 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
130 | (substitute* "configure.ac" | |
131 | (("/usr/share/anthy/anthy.dic") | |
132 | (string-append (assoc-ref inputs "anthy") | |
133 | "/share/anthy/anthy.dic"))) | |
134 | (substitute* "configure.ac" | |
135 | (("/usr/bin:\\$GTK3_LIBDIR/libgtk-3-0") | |
136 | (string-append (assoc-ref inputs "gtk+:bin") | |
137 | "/bin:$GTK3_LIBDIR/libgtk-3-0")) | |
138 | (("/usr/bin:\\$GTK2_LIBDIR/libgtk2.0-0") | |
139 | (string-append (assoc-ref inputs "gtk+-2:bin") | |
140 | "/bin:$GTK2_LIBDIR/libgtk2.0-0"))) | |
141 | (substitute* "modules/clients/gtk/Makefile.am" | |
142 | (("\\$\\(GTK3_LIBDIR\\)") | |
2e9fe98a | 143 | (string-append (assoc-ref outputs "gtk") |
83299e54 RG |
144 | "/lib")) |
145 | (("\\$\\(GTK2_LIBDIR\\)") | |
2e9fe98a | 146 | (string-append (assoc-ref outputs "gtk") |
83299e54 | 147 | "/lib"))) |
83299e54 RG |
148 | (substitute* "modules/clients/qt5/Makefile.am" |
149 | (("\\$\\(QT5_IM_MODULE_DIR\\)") | |
2e9fe98a | 150 | (string-append (assoc-ref outputs "qt") |
83299e54 RG |
151 | "/lib/qt5/plugins/inputmethods"))) |
152 | (substitute* '("bin/nimf-settings/Makefile.am" | |
153 | "data/apparmor-abstractions/Makefile.am" | |
154 | "data/Makefile.am" "data/im-config/Makefile.am" | |
155 | "data/imsettings/Makefile.am") | |
156 | (("/etc") | |
157 | (string-append (assoc-ref outputs "out") | |
158 | "/etc")) | |
159 | (("/usr/share") | |
160 | (string-append (assoc-ref outputs "out") | |
161 | "/share"))) | |
162 | #t)) | |
163 | (add-after 'install 'qt-wrap | |
164 | (assoc-ref qt:%standard-phases 'qt-wrap))))) | |
165 | (native-inputs | |
166 | `(("autoconf" ,autoconf) | |
167 | ("automake" ,automake) | |
168 | ("docbook-xml-4.3" ,docbook-xml-4.3) | |
169 | ("gettext" ,gettext-minimal) | |
170 | ("gobject-introspection" ,gobject-introspection) | |
171 | ("gtk+-2:bin" ,gtk+-2 "bin") | |
172 | ("gtk+:bin" ,gtk+ "bin") | |
9dea1618 | 173 | ("gtk-doc" ,gtk-doc/stable) |
83299e54 RG |
174 | ("intltool" ,intltool) |
175 | ("libtool" ,libtool) | |
176 | ("perl" ,perl) | |
177 | ("pkg-config" ,pkg-config) | |
178 | ("which" ,which))) | |
179 | (inputs | |
180 | `(("anthy" ,anthy) | |
181 | ("appindicator" ,libappindicator) | |
182 | ("gtk+-2" ,gtk+-2) | |
183 | ("gtk+" ,gtk+) | |
184 | ("hangul" ,libhangul) | |
185 | ("m17n-db" ,m17n-db) | |
186 | ("m17n-lib" ,m17n-lib) | |
83299e54 RG |
187 | ("qtbase" ,qtbase) |
188 | ("rime" ,librime) | |
189 | ("rsvg" ,librsvg) | |
190 | ("wayland" ,wayland) | |
191 | ("wayland-protocols" ,wayland-protocols) | |
192 | ("x11" ,libx11) | |
193 | ("xkbcommon" ,libxkbcommon) | |
194 | ("xklavier" ,libxklavier))) | |
195 | (propagated-inputs | |
196 | `(("glib" ,glib))) | |
197 | (synopsis "Lightweight input method framework") | |
198 | (description "Nimf is a lightweight, fast and extensible input method | |
199 | framework. This package provides a fork of the original nimf project, that | |
3fb6d439 | 200 | focuses especially on Korean input (Hangul, Hanja, ...).") |
83299e54 | 201 | (home-page "https://github.com/hamonikr/nimf/") |
cfcf9dea | 202 | (license license:lgpl3+))) |
83299e54 | 203 | |
677cb21b RG |
204 | (define-public hime |
205 | (package | |
206 | (name "hime") | |
207 | (version "0.9.11") | |
208 | (source | |
209 | (origin | |
210 | (method git-fetch) | |
211 | (uri | |
212 | (git-reference | |
213 | (url "https://github.com/hime-ime/hime.git") | |
214 | (commit | |
215 | (string-append "v" version)))) | |
216 | (file-name | |
217 | (git-file-name name version)) | |
218 | (sha256 | |
219 | (base32 "1wn0ici78x5qh6hvv50bf76ld7ds42hzzl4l5qz34hp8wyvrwakw")))) | |
220 | (build-system glib-or-gtk-build-system) | |
221 | (arguments | |
222 | `(#:tests? #f ; No target | |
223 | #:imported-modules | |
224 | (,@%glib-or-gtk-build-system-modules | |
225 | (guix build cmake-build-system) | |
226 | (guix build qt-build-system)) | |
227 | #:modules | |
228 | ((guix build glib-or-gtk-build-system) | |
229 | ((guix build qt-build-system) | |
230 | #:prefix qt:) | |
231 | (guix build utils)) | |
232 | #:configure-flags | |
233 | (list | |
234 | ;; FIXME | |
235 | ;; error: unknown type name ‘GtkStatusIcon’ | |
236 | "--disable-system-tray") | |
237 | #:phases | |
238 | (modify-phases %standard-phases | |
239 | (add-after 'unpack 'patch-std | |
240 | (lambda _ | |
241 | (substitute* "configure" | |
242 | (("gnu17") | |
243 | "gnu11") | |
244 | (("gnu++17") | |
245 | "gnu++11")) | |
246 | #t)) | |
247 | (add-after 'install 'qt-wrap | |
248 | (assoc-ref qt:%standard-phases 'qt-wrap))))) | |
249 | (native-inputs | |
250 | `(("gettext" ,gettext-minimal) | |
251 | ("pkg-config" ,pkg-config) | |
252 | ("whereis" ,util-linux))) | |
253 | (inputs | |
254 | `(("anthy" ,anthy) | |
255 | ("appindicator" ,libappindicator) | |
256 | ("chewing" ,libchewing) | |
257 | ("gtk+" ,gtk+) | |
258 | ("qtbase" ,qtbase) | |
259 | ("xtst" ,libxtst))) | |
260 | (synopsis "HIME Input Method Editor") | |
261 | (description "Hime is an extremely easy-to-use input method framework. It | |
262 | is lightweight, stable, powerful and supports many commonly used input methods, | |
263 | including Cangjie, Zhuyin, Dayi, Ranked, Shrimp, Greek, Anthy, Korean, Latin, | |
264 | Random Cage Fighting Birds, Cool Music etc.") | |
265 | (home-page "http://hime-ime.github.io/") | |
cfcf9dea TGR |
266 | (license (list license:gpl2+ license:lgpl2.1+ |
267 | license:fdl1.2+)))) ; documentation | |
677cb21b | 268 | |
823b27d9 RG |
269 | (define-public libchewing |
270 | (package | |
271 | (name "libchewing") | |
272 | (version "0.5.1") | |
273 | (source | |
274 | (origin | |
275 | (method git-fetch) | |
276 | (uri | |
277 | (git-reference | |
278 | (url "https://github.com/chewing/libchewing.git") | |
279 | (commit | |
280 | (string-append "v" version)))) | |
281 | (file-name | |
282 | (git-file-name name version)) | |
283 | (sha256 | |
284 | (base32 "04d09w6xdd08v6laj9y4qmqsijw5i2jvshcilhh4vg6cfnfgl2my")))) | |
285 | (build-system gnu-build-system) | |
286 | (arguments | |
63c237d0 JB |
287 | `(;; test-easy-symbol and test-fullshape fail with multiple cores. |
288 | #:parallel-tests? #f | |
289 | #:phases | |
823b27d9 RG |
290 | (modify-phases %standard-phases |
291 | (add-after 'unpack 'disable-failing-tests | |
292 | (lambda _ | |
293 | (substitute* "test/Makefile.am" | |
294 | ((" test-bopomofo ") | |
295 | "") | |
296 | ((" test-config ") | |
297 | "") | |
298 | ((" test-reset ") | |
299 | "") | |
300 | ((" test-symbol ") | |
301 | "") | |
302 | ((" test-keyboardless ") | |
303 | "") | |
304 | ((" test-special-symbol ") | |
305 | "") | |
306 | ((" test-keyboard ") | |
307 | "") | |
308 | ((" test-regression ") | |
309 | "") | |
310 | ((" test-userphrase ") | |
311 | "")) | |
312 | #t))))) | |
313 | (native-inputs | |
314 | `(("autoconf" ,autoconf) | |
315 | ("automake" ,automake) | |
316 | ("libtool" ,libtool) | |
317 | ("perl" ,perl) | |
318 | ("pkg-config" ,pkg-config) | |
319 | ("python" ,python-wrapper) | |
320 | ("texinfo" ,texinfo))) | |
321 | (inputs | |
322 | `(("ncurses" ,ncurses) | |
323 | ("sqlite" ,sqlite))) | |
324 | (synopsis "Chinese phonetic input method") | |
325 | (description "Chewing is an intelligent phonetic (Zhuyin/Bopomofo) input | |
326 | method, one of the most popular choices for Traditional Chinese users.") | |
327 | (home-page "http://chewing.im/") | |
cfcf9dea | 328 | (license license:lgpl2.1+))) |
823b27d9 | 329 | |
899784fb RG |
330 | (define-public liblouis |
331 | (package | |
332 | (name "liblouis") | |
b4fb61f6 | 333 | (version "3.15.0") |
899784fb RG |
334 | (source |
335 | (origin | |
336 | (method git-fetch) | |
337 | (uri | |
338 | (git-reference | |
8ed4c468 | 339 | (url "https://github.com/liblouis/liblouis") |
899784fb RG |
340 | (commit (string-append "v" version)))) |
341 | (file-name (git-file-name name version)) | |
342 | (sha256 | |
b4fb61f6 | 343 | (base32 "1ljy5xsy7vf2r0ix0d7bqcr6qvr6897f8madsx9zlm1mrj31n5px")))) |
899784fb RG |
344 | (build-system gnu-build-system) |
345 | (outputs '("out" "bin" "doc" "python")) | |
346 | (arguments | |
347 | `(#:configure-flags | |
348 | (list | |
349 | "--disable-static" | |
350 | "--enable-ucs4") | |
351 | #:phases | |
352 | (modify-phases %standard-phases | |
899784fb RG |
353 | (add-after 'install 'install-python-extension |
354 | (lambda* (#:key outputs #:allow-other-keys) | |
355 | (with-directory-excursion "python" | |
356 | (invoke "python" "setup.py" "install" | |
357 | (string-append "--prefix=" | |
358 | (assoc-ref outputs "python")) | |
359 | "--root=/"))))))) | |
360 | (native-inputs | |
361 | `(("autoconf" ,autoconf) | |
362 | ("automake" ,automake) | |
363 | ("clang-format" ,clang) | |
364 | ("help2man" ,help2man) | |
365 | ("libtool" ,libtool) | |
366 | ("libyaml" ,libyaml) | |
367 | ("makeinfo" ,texinfo) | |
368 | ("perl" ,perl) | |
369 | ("pkg-config" ,pkg-config) | |
370 | ("python" ,python-wrapper))) | |
371 | (synopsis "Braille translator and back-translator") | |
372 | (description "Liblouis is a braille translator and back-translator named in | |
373 | honor of Louis Braille. It features support for computer and literary braille, | |
374 | supports contracted and uncontracted translation for many languages and has | |
375 | support for hyphenation. New languages can easily be added through tables that | |
376 | support a rule- or dictionary based approach. Tools for testing and debugging | |
377 | tables are also included. Liblouis also supports math braille, Nemeth and | |
378 | Marburg.") | |
379 | (home-page "http://liblouis.org/") | |
cfcf9dea TGR |
380 | (license (list license:lgpl2.1+ ; library |
381 | license:gpl3+)))) ; tools | |
899784fb | 382 | |
8205fe44 RG |
383 | (define-public liblouisutdml |
384 | (package | |
385 | (name "liblouisutdml") | |
433b391f | 386 | (version "2.9.0") |
8205fe44 RG |
387 | (source |
388 | (origin | |
389 | (method git-fetch) | |
390 | (uri | |
391 | (git-reference | |
8ed4c468 | 392 | (url "https://github.com/liblouis/liblouisutdml") |
8205fe44 RG |
393 | (commit (string-append "v" version)))) |
394 | (file-name (git-file-name name version)) | |
395 | (sha256 | |
433b391f | 396 | (base32 "0c32cfcfp0lyfd655c9ihhh3p7lhrb9q3xbll7q5dw4km86gaq6w")))) |
8205fe44 RG |
397 | (build-system gnu-build-system) |
398 | (outputs '("out" "bin" "doc")) | |
399 | (arguments | |
400 | `(#:configure-flags | |
433b391f | 401 | (list "--disable-static"))) |
8205fe44 RG |
402 | (native-inputs |
403 | `(("autoconf" ,autoconf) | |
404 | ("automake" ,automake) | |
405 | ("help2man" ,help2man) | |
406 | ("jdk" ,icedtea "jdk") | |
407 | ("libtool" ,libtool) | |
408 | ("makeinfo" ,texinfo) | |
409 | ("pkg-config" ,pkg-config))) | |
410 | (inputs | |
411 | `(("libxml2" ,libxml2))) | |
412 | (propagated-inputs | |
413 | `(("liblouis" ,liblouis) | |
414 | ("liblouis:bin" ,liblouis "bin"))) | |
415 | (synopsis "Braille transcription services") | |
416 | (description "Liblouisutdml is a library providing complete braille | |
417 | transcription services for xml, html and text documents. It translates into | |
418 | appropriate braille codes and formats according to its style sheet and the | |
419 | specifications in the document.") | |
420 | (home-page "http://liblouis.org/") | |
cfcf9dea TGR |
421 | (license (list license:lgpl3+ ; library |
422 | license:gpl3+)))) ; tools | |
8205fe44 | 423 | |
a29eb739 RG |
424 | (define-public libstemmer |
425 | (package | |
426 | (name "libstemmer") | |
427 | (version "2.0.0") | |
428 | (source | |
429 | (origin | |
430 | (method url-fetch) | |
431 | (uri "https://snowballstem.org/dist/libstemmer_c.tgz") | |
432 | (sha256 | |
433 | (base32 "1z2xvrjsaaypc04lwz7dg8mjm5cq1gzmn0l544pn6y2ll3r7ckh5")))) | |
434 | (build-system gnu-build-system) | |
435 | (arguments | |
436 | `(#:tests? #f ; No tests exist | |
437 | #:make-flags | |
438 | (list | |
439 | (string-append "CC=" ,(cc-for-target)) | |
440 | "CFLAGS=-fPIC") | |
441 | #:phases | |
442 | (modify-phases %standard-phases | |
443 | (delete 'configure) | |
444 | (replace 'install | |
445 | (lambda* (#:key outputs #:allow-other-keys) | |
446 | (let* ((out (assoc-ref outputs "out")) | |
447 | (out-bin (string-append out "/bin")) | |
448 | (out-include (string-append out "/include")) | |
449 | (out-lib (string-append out "/lib"))) | |
450 | (install-file "stemwords" out-bin) | |
451 | (install-file "include/libstemmer.h" out-include) | |
452 | (rename-file "libstemmer.o" "libstemmer.a") | |
453 | (install-file "libstemmer.a" out-lib) | |
454 | #t)))))) | |
455 | (synopsis "Stemming Library") | |
456 | (description "LibStemmer provides stemming library, supporting several | |
457 | languages.") | |
458 | (home-page "https://snowballstem.org/") | |
cfcf9dea | 459 | (license license:bsd-3))) |
a29eb739 | 460 | |
0c32bf01 EB |
461 | (define-public perl-lingua-en-findnumber |
462 | (package | |
463 | (name "perl-lingua-en-findnumber") | |
84f06e54 | 464 | (version "1.32") |
0c32bf01 EB |
465 | (source |
466 | (origin | |
467 | (method url-fetch) | |
468 | (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/" | |
469 | "Lingua-EN-FindNumber-" version ".tar.gz")) | |
470 | (sha256 | |
471 | (base32 | |
84f06e54 | 472 | "015ximzdp42v824llwlg2pd77vd0d172lb4xs55q9f9zhqf6s5qx")))) |
0c32bf01 EB |
473 | (build-system perl-build-system) |
474 | (propagated-inputs | |
475 | `(("perl-lingua-en-words2nums" ,perl-lingua-en-words2nums))) | |
9aba9b12 | 476 | (home-page "https://metacpan.org/release/Lingua-EN-FindNumber") |
0c32bf01 EB |
477 | (synopsis "Locate (written) numbers in English text ") |
478 | (description "This module provides a regular expression for finding | |
479 | numbers in English text. It also provides functions for extracting and | |
480 | manipulating such numbers.") | |
cfcf9dea | 481 | (license license:perl-license))) |
0c32bf01 | 482 | |
57ff0e04 EB |
483 | (define-public perl-lingua-en-inflect |
484 | (package | |
485 | (name "perl-lingua-en-inflect") | |
ce0be1bc | 486 | (version "1.903") |
57ff0e04 EB |
487 | (source |
488 | (origin | |
489 | (method url-fetch) | |
490 | (uri (string-append "mirror://cpan/authors/id/D/DC/DCONWAY/" | |
491 | "Lingua-EN-Inflect-" version ".tar.gz")) | |
492 | (sha256 | |
493 | (base32 | |
ce0be1bc | 494 | "0j8d1f1wvmgc11d71pc8xp8fv5a1nb2yfw1dgd19xhscn1klpvzw")))) |
57ff0e04 | 495 | (build-system perl-build-system) |
a2190ccc | 496 | (native-inputs `(("perl-module-build" ,perl-module-build))) |
9aba9b12 | 497 | (home-page "https://metacpan.org/release/Lingua-EN-Inflect") |
57ff0e04 EB |
498 | (synopsis "Convert singular to plural") |
499 | (description "Lingua::EN::Inflect provides plural inflections, | |
500 | \"a\"/\"an\" selection for English words, and manipulation of numbers as | |
501 | words. Plural forms of all nouns, most verbs, and some adjectives are | |
502 | provided. Where appropriate, \"classical\" variants (for example: \"brother\" | |
503 | -> \"brethren\", \"dogma\" -> \"dogmata\", etc.) are also provided.") | |
cfcf9dea | 504 | (license license:perl-license))) |
57ff0e04 | 505 | |
4812a813 EB |
506 | (define-public perl-lingua-en-inflect-number |
507 | (package | |
508 | (name "perl-lingua-en-inflect-number") | |
e2fb341f | 509 | (version "1.12") |
4812a813 EB |
510 | (source |
511 | (origin | |
512 | (method url-fetch) | |
513 | (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/" | |
514 | "Lingua-EN-Inflect-Number-" version ".tar.gz")) | |
515 | (sha256 | |
516 | (base32 | |
e2fb341f | 517 | "1gxccynkaqav43ww43jp4rzkyr36x97jd03yb5f6yx0jhn1k7yv6")))) |
4812a813 EB |
518 | (build-system perl-build-system) |
519 | (propagated-inputs | |
520 | `(("perl-lingua-en-inflect" ,perl-lingua-en-inflect))) | |
9aba9b12 | 521 | (home-page "https://metacpan.org/release/Lingua-EN-Inflect-Number") |
4812a813 EB |
522 | (synopsis "Force number of words to singular or plural") |
523 | (description "This module extends the functionality of Lingua::EN::Inflect | |
524 | with three new functions for determining plurality of a word and forcefully | |
525 | converting a word to singular or plural.") | |
cfcf9dea | 526 | (license license:perl-license))) |
4812a813 | 527 | |
cfed969c EB |
528 | (define-public perl-lingua-en-inflect-phrase |
529 | (package | |
530 | (name "perl-lingua-en-inflect-phrase") | |
cd75b642 | 531 | (version "0.20") |
cfed969c EB |
532 | (source |
533 | (origin | |
534 | (method url-fetch) | |
535 | (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/" | |
536 | "Lingua-EN-Inflect-Phrase-" version ".tar.gz")) | |
537 | (sha256 | |
538 | (base32 | |
cd75b642 | 539 | "1a6y1l2pjim2242wcpgz066di4pbzfgsjjdl7vg5a5wzm48qj1am")))) |
cfed969c EB |
540 | (build-system perl-build-system) |
541 | (native-inputs | |
542 | `(("perl-test-nowarnings" ,perl-test-nowarnings))) | |
543 | (propagated-inputs | |
544 | `(("perl-lingua-en-findnumber" ,perl-lingua-en-findnumber) | |
545 | ("perl-lingua-en-inflect" ,perl-lingua-en-inflect) | |
546 | ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number) | |
547 | ("perl-lingua-en-number-isordinal" ,perl-lingua-en-number-isordinal) | |
548 | ("perl-lingua-en-tagger" ,perl-lingua-en-tagger))) | |
9aba9b12 | 549 | (home-page "https://metacpan.org/release/Lingua-EN-Inflect-Phrase") |
cfed969c EB |
550 | (synopsis "Inflect short English phrases") |
551 | (description "This module attempts to pluralize or singularize short | |
552 | English phrases.") | |
cfcf9dea | 553 | (license license:perl-license))) |
cfed969c | 554 | |
930768b3 EB |
555 | (define-public perl-lingua-en-number-isordinal |
556 | (package | |
557 | (name "perl-lingua-en-number-isordinal") | |
5b5b4edf | 558 | (version "0.05") |
930768b3 EB |
559 | (source |
560 | (origin | |
561 | (method url-fetch) | |
562 | (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/" | |
563 | "Lingua-EN-Number-IsOrdinal-" version ".tar.gz")) | |
564 | (sha256 | |
565 | (base32 | |
5b5b4edf | 566 | "1mhqjvh2ad30gjab5b3a6mbr4aysyrscp4wp42yy5x6001a6km98")))) |
930768b3 EB |
567 | (build-system perl-build-system) |
568 | (native-inputs | |
569 | `(("perl-try-tiny" ,perl-try-tiny) | |
570 | ("perl-test-fatal" ,perl-test-fatal))) | |
571 | (propagated-inputs | |
572 | `(("perl-lingua-en-findnumber" ,perl-lingua-en-findnumber))) | |
9aba9b12 | 573 | (home-page "https://metacpan.org/release/Lingua-EN-Number-IsOrdinal") |
930768b3 EB |
574 | (synopsis "Detect if English number is ordinal or cardinal") |
575 | (description "This module will tell you if a number, either in words or as | |
576 | digits, is a cardinal or ordinal number.") | |
cfcf9dea | 577 | (license license:perl-license))) |
930768b3 | 578 | |
d7de0883 EB |
579 | (define-public perl-lingua-en-tagger |
580 | (package | |
581 | (name "perl-lingua-en-tagger") | |
35e4e359 | 582 | (version "0.30") |
d7de0883 EB |
583 | (source |
584 | (origin | |
585 | (method url-fetch) | |
586 | (uri (string-append "mirror://cpan/authors/id/A/AC/ACOBURN/" | |
587 | "Lingua-EN-Tagger-" version ".tar.gz")) | |
588 | (sha256 | |
589 | (base32 | |
35e4e359 | 590 | "0nrnkvsf9f0a7lp82sanmy89ms2nqq1lvjqicvsagsvzp513bl5b")))) |
d7de0883 EB |
591 | (build-system perl-build-system) |
592 | (propagated-inputs | |
593 | `(("perl-memoize-expirelru" ,perl-memoize-expirelru) | |
594 | ("perl-lingua-stem" ,perl-lingua-stem) | |
595 | ("perl-html-parser" ,perl-html-parser) | |
596 | ("perl-html-tagset" ,perl-html-tagset))) | |
9aba9b12 | 597 | (home-page "https://metacpan.org/release/Lingua-EN-Tagger") |
d7de0883 EB |
598 | (synopsis "Part-of-speech tagger for English natural language processing") |
599 | (description "This module is a probability based, corpus-trained tagger | |
600 | that assigns part-of-speech tags to English text based on a lookup dictionary | |
601 | and a set of probability values. The tagger assigns appropriate tags based on | |
602 | conditional probabilities - it examines the preceding tag to determine the | |
603 | appropriate tag for the current word. Unknown words are classified according | |
604 | to word morphology or can be set to be treated as nouns or other parts of | |
605 | speech. The tagger also extracts as many nouns and noun phrases as it can, | |
606 | using a set of regular expressions.") | |
cfcf9dea | 607 | (license license:gpl3))) |
d7de0883 | 608 | |
fc436dba EB |
609 | (define-public perl-lingua-en-words2nums |
610 | (package | |
611 | (name "perl-lingua-en-words2nums") | |
612 | (version "0.18") | |
613 | (source | |
614 | (origin | |
615 | (method url-fetch) | |
616 | (uri (string-append "mirror://cpan/authors/id/J/JO/JOEY/" | |
617 | "Lingua-EN-Words2Nums-" version ".tar.gz")) | |
618 | (sha256 | |
619 | (base32 | |
620 | "118xx8qr1zbx30psv7ic55w65h15mc1vz6zicshfm96jgiwmcrb8")))) | |
621 | (build-system perl-build-system) | |
9aba9b12 | 622 | (home-page "https://metacpan.org/release/Lingua-EN-Words2Nums") |
fc436dba EB |
623 | (synopsis "Convert English text to numbers") |
624 | (description "This module converts English text into numbers. It supports | |
625 | both ordinal and cardinal numbers, negative numbers, and very large numbers.") | |
cfcf9dea | 626 | (license license:perl-license))) |
9b446711 EB |
627 | |
628 | (define-public perl-lingua-pt-stemmer | |
629 | (package | |
630 | (name "perl-lingua-pt-stemmer") | |
8895a968 | 631 | (version "0.02") |
9b446711 EB |
632 | (source |
633 | (origin | |
634 | (method url-fetch) | |
e8409dd2 | 635 | (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/" |
9b446711 EB |
636 | "Lingua-PT-Stemmer-" version ".tar.gz")) |
637 | (sha256 | |
638 | (base32 | |
8895a968 | 639 | "17c48sfbgwd2ivlgf59sr6jdhwa3aim8750f8pyzz7xpi8gz0var")))) |
9b446711 | 640 | (build-system perl-build-system) |
9aba9b12 | 641 | (home-page "https://metacpan.org/release/Lingua-PT-Stemmer") |
9b446711 EB |
642 | (synopsis "Portuguese language stemming") |
643 | (description "This module implements a Portuguese stemming algorithm | |
644 | proposed in the paper A Stemming Algorithm for the Portuguese Language by | |
645 | Moreira, V. and Huyck, C.") | |
cfcf9dea | 646 | (license license:perl-license))) |
df11e052 | 647 | |
9766e4fe EB |
648 | (define-public perl-lingua-stem |
649 | (package | |
650 | (name "perl-lingua-stem") | |
651 | (version "0.84") | |
652 | (source | |
653 | (origin | |
654 | (method url-fetch) | |
655 | (uri (string-append "mirror://cpan/authors/id/S/SN/SNOWHARE/" | |
656 | "Lingua-Stem-" version ".tar.gz")) | |
657 | (sha256 | |
658 | (base32 | |
659 | "12avh2mnnc7llmmshrr5bgb473fvydxnlqrqbl2815mf2dp4pxcg")))) | |
660 | (build-system perl-build-system) | |
a2190ccc EB |
661 | (native-inputs |
662 | `(("perl-module-build" ,perl-module-build))) | |
9766e4fe EB |
663 | (propagated-inputs |
664 | `(("perl-lingua-pt-stemmer" ,perl-lingua-pt-stemmer) | |
665 | ("perl-lingua-stem-fr" ,perl-lingua-stem-fr) | |
666 | ("perl-lingua-stem-it" ,perl-lingua-stem-it) | |
667 | ("perl-lingua-stem-ru" ,perl-lingua-stem-ru) | |
668 | ("perl-lingua-stem-snowball-da" ,perl-lingua-stem-snowball-da) | |
669 | ("perl-snowball-norwegian" ,perl-snowball-norwegian) | |
670 | ("perl-snowball-swedish" ,perl-snowball-swedish) | |
671 | ("perl-text-german" ,perl-text-german))) | |
9aba9b12 | 672 | (home-page "https://metacpan.org/release/Lingua-Stem") |
9766e4fe EB |
673 | (synopsis "Stemming of words in various languages") |
674 | (description "This routine applies stemming algorithms to its parameters, | |
675 | returning the stemmed words as appropriate to the selected locale.") | |
cfcf9dea | 676 | (license license:perl-license))) |
9766e4fe | 677 | |
df11e052 EB |
678 | (define-public perl-lingua-stem-fr |
679 | (package | |
680 | (name "perl-lingua-stem-fr") | |
681 | (version "0.02") | |
682 | (source | |
683 | (origin | |
684 | (method url-fetch) | |
685 | (uri (string-append "mirror://cpan/authors/id/S/SD/SDP/" | |
686 | "Lingua-Stem-Fr-" version ".tar.gz")) | |
687 | (sha256 | |
688 | (base32 | |
689 | "0vyrspwzaqjxm5mqshf4wvwa3938mkajd1918d9ii2l9m2rn8kwx")))) | |
690 | (build-system perl-build-system) | |
9aba9b12 | 691 | (home-page "https://metacpan.org/release/Lingua-Stem-Fr") |
df11e052 EB |
692 | (synopsis "Porter's stemming algorithm for French") |
693 | (description "This module uses a modified version of the Porter Stemming | |
694 | Algorithm to return a stemmed French word.") | |
cfcf9dea | 695 | (license license:perl-license))) |
6afe5959 EB |
696 | |
697 | (define-public perl-lingua-stem-it | |
698 | (package | |
699 | (name "perl-lingua-stem-it") | |
700 | (version "0.02") | |
701 | (source | |
702 | (origin | |
703 | (method url-fetch) | |
704 | (uri (string-append "mirror://cpan/authors/id/A/AC/ACALPINI/" | |
705 | "Lingua-Stem-It-" version ".tar.gz")) | |
706 | (sha256 | |
707 | (base32 | |
708 | "1207r183s5hlh4mfwa6p46vzm0dhvrs2dnss5s41a0gyfkxp7riq")))) | |
709 | (build-system perl-build-system) | |
9aba9b12 | 710 | (home-page "https://metacpan.org/release/Lingua-Stem-It") |
6afe5959 EB |
711 | (synopsis "Porter's stemming algorithm for Italian") |
712 | (description "This module applies the Porter Stemming Algorithm to its | |
713 | parameters, returning the stemmed Italian word.") | |
cfcf9dea | 714 | (license license:perl-license))) |
95d2eec1 EB |
715 | |
716 | (define-public perl-lingua-stem-ru | |
717 | (package | |
718 | (name "perl-lingua-stem-ru") | |
a4b7142e | 719 | (version "0.04") |
95d2eec1 EB |
720 | (source |
721 | (origin | |
722 | (method url-fetch) | |
a4b7142e | 723 | (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/" |
95d2eec1 EB |
724 | "Lingua-Stem-Ru-" version ".tar.gz")) |
725 | (sha256 | |
726 | (base32 | |
a4b7142e | 727 | "0a2jmdz7jn32qj5hyiw5kbv8fvlpmws8i00a6xcbkzb48yvwww0j")))) |
95d2eec1 | 728 | (build-system perl-build-system) |
9aba9b12 | 729 | (home-page "https://metacpan.org/release/Lingua-Stem-Ru") |
95d2eec1 EB |
730 | (synopsis "Porter's stemming algorithm for Russian") |
731 | (description "This module applies the Porter Stemming Algorithm to its | |
732 | parameters, returning the stemmed Russian (KOI8-R only) word.") | |
cfcf9dea | 733 | (license license:perl-license))) |
30c40044 EB |
734 | |
735 | (define-public perl-lingua-stem-snowball-da | |
736 | (package | |
737 | (name "perl-lingua-stem-snowball-da") | |
738 | (version "1.01") | |
739 | (source | |
740 | (origin | |
741 | (method url-fetch) | |
742 | (uri (string-append "mirror://cpan/authors/id/C/CI/CINE/" | |
743 | "Lingua-Stem-Snowball-Da-" version ".tar.gz")) | |
744 | (sha256 | |
745 | (base32 | |
746 | "0mm0m7glm1s6i9f6a78jslw6wh573208arxhq93yriqmw17bwf9f")))) | |
747 | (build-system perl-build-system) | |
9aba9b12 | 748 | (home-page "https://metacpan.org/release/Lingua-Stem-Snowball-Da") |
30c40044 EB |
749 | (synopsis "Porters stemming algorithm for Danish") |
750 | (description "Lingua::Stem::Snowball::Da is a perl port of the danish | |
751 | stemmer at http://snowball.sourceforge.net, it was originally altered from the | |
752 | Lingua::Stem::Snowball::Se.") | |
cfcf9dea | 753 | (license license:gpl2))) |
1064abdc EB |
754 | |
755 | (define-public perl-snowball-norwegian | |
756 | (package | |
757 | (name "perl-snowball-norwegian") | |
758 | (version "1.2") | |
759 | (source | |
760 | (origin | |
761 | (method url-fetch) | |
762 | (uri (string-append "mirror://cpan/authors/id/A/AS/ASKSH/" | |
763 | "Snowball-Norwegian-" version ".tar.gz")) | |
764 | (sha256 | |
765 | (base32 | |
766 | "0675v45bbsh7vr7kpf36xs2q79g02iq1kmfw22h20xdk4rzqvkqx")))) | |
767 | (build-system perl-build-system) | |
a2190ccc | 768 | (native-inputs `(("perl-module-build" ,perl-module-build))) |
9aba9b12 | 769 | (home-page "https://metacpan.org/release/Snowball-Norwegian") |
1064abdc EB |
770 | (synopsis "Porters stemming algorithm for Norwegian") |
771 | (description "Lingua::Stem::Snowball::No is a perl port of the norwegian | |
772 | stemmer at http://snowball.tartarus.org.") | |
cfcf9dea | 773 | (license license:perl-license))) |
1f4b1129 EB |
774 | |
775 | (define-public perl-snowball-swedish | |
776 | (package | |
777 | (name "perl-snowball-swedish") | |
778 | (version "1.2") | |
779 | (source | |
780 | (origin | |
781 | (method url-fetch) | |
782 | (uri (string-append "mirror://cpan/authors/id/A/AS/ASKSH/" | |
783 | "Snowball-Swedish-" version ".tar.gz")) | |
784 | (sha256 | |
785 | (base32 | |
786 | "0agwc12jk5kmabnpsplw3wf4ii5w1zb159cpin44x3srb0sr5apg")))) | |
787 | (build-system perl-build-system) | |
a2190ccc | 788 | (native-inputs `(("perl-module-build" ,perl-module-build))) |
9aba9b12 | 789 | (home-page "https://metacpan.org/release/Snowball-Swedish") |
1f4b1129 EB |
790 | (synopsis "Porters stemming algorithm for Swedish") |
791 | (description "Lingua::Stem::Snowball::Se is a perl port of the swedish | |
792 | stemmer at http://snowball.sourceforge.net.") | |
cfcf9dea | 793 | (license license:perl-license))) |
2b83abae | 794 | |
f3bbbb73 EB |
795 | (define-public perl-string-toidentifier-en |
796 | (package | |
797 | (name "perl-string-toidentifier-en") | |
97c79494 | 798 | (version "0.12") |
f3bbbb73 EB |
799 | (source |
800 | (origin | |
801 | (method url-fetch) | |
802 | (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/" | |
803 | "String-ToIdentifier-EN-" version ".tar.gz")) | |
804 | (sha256 | |
805 | (base32 | |
97c79494 | 806 | "12nw7h2yiybhdw0vnnpc7bif8ylhsn6kqf6s39dsrf9h54iq9yrs")))) |
f3bbbb73 EB |
807 | (build-system perl-build-system) |
808 | (propagated-inputs | |
809 | `(("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase) | |
810 | ("perl-text-unidecode" ,perl-text-unidecode) | |
811 | ("perl-namespace-clean" ,perl-namespace-clean))) | |
9aba9b12 | 812 | (home-page "https://metacpan.org/release/String-ToIdentifier-EN") |
e881752c | 813 | (synopsis "Convert strings to English program identifiers") |
f3bbbb73 EB |
814 | (description "This module provides a utility method, \"to_identifier\" for |
815 | converting an arbitrary string into a readable representation using the ASCII | |
816 | subset of \"\\w\" for use as an identifier in a computer program. The intent | |
817 | is to make unique identifier names from which the content of the original | |
818 | string can be easily inferred by a human just by reading the identifier.") | |
cfcf9dea | 819 | (license license:perl-license))) |
f3bbbb73 | 820 | |
2b83abae EB |
821 | (define-public perl-text-german |
822 | (package | |
823 | (name "perl-text-german") | |
824 | (version "0.06") | |
825 | (source | |
826 | (origin | |
827 | (method url-fetch) | |
828 | (uri (string-append "mirror://cpan/authors/id/U/UL/ULPFR/" | |
829 | "Text-German-" version ".tar.gz")) | |
830 | (sha256 | |
831 | (base32 | |
832 | "1p87pgap99lw0nv62i3ghvsi7yg90lhn8vsa3yqp75rd04clybcj")))) | |
833 | (build-system perl-build-system) | |
9aba9b12 | 834 | (home-page "https://metacpan.org/release/Text-German") |
2b83abae | 835 | (synopsis "German grundform reduction") |
e881752c | 836 | (description "This module is a rather incomplete implementation of work |
2b83abae | 837 | done by Gudrun Putze-Meier.") |
cfcf9dea | 838 | (license license:perl-license))) |
410387ad AV |
839 | |
840 | (define* (tegaki-release-uri proj version | |
841 | #:optional (ext "tar.gz")) | |
842 | (string-append "https://github.com/tegaki/tegaki/releases/download" | |
843 | "/v" version "/" proj "-" version "." ext)) | |
844 | ||
845 | (define remove-pre-compiled-files | |
846 | (lambda exts | |
847 | "Return snippet for removing pre-compiled files matching one of the | |
848 | extensions in EXTS." | |
849 | `(begin (for-each delete-file | |
850 | (find-files "." | |
851 | (lambda (name _) | |
852 | (any (cut string-suffix? <> name) | |
853 | (map (cut string-append "." <>) | |
854 | ',exts))))) | |
855 | #t))) | |
856 | ||
857 | ;;; modules required for the above snippet | |
858 | (define remove-pre-compiled-files-modules | |
859 | '((guix build utils) | |
860 | (srfi srfi-1) | |
861 | (srfi srfi-26))) | |
862 | ||
863 | (define-public python2-tegaki-wagomu | |
864 | (package | |
865 | (name "python2-tegaki-wagomu") | |
866 | (version "0.3.1") | |
867 | (source | |
868 | (origin | |
869 | (method url-fetch) | |
870 | (uri (tegaki-release-uri "tegaki-wagomu" version)) | |
871 | (sha256 | |
872 | (base32 | |
873 | "1pzdiq4zy1nyylaj9i6v2h4h0r05klahskzpafpp367p4rysi1x9")) | |
874 | (modules remove-pre-compiled-files-modules) | |
875 | (snippet (remove-pre-compiled-files "pyc")))) | |
876 | (build-system python-build-system) | |
877 | (arguments | |
878 | `(#:python ,python-2 ; only Python 2 is supported | |
879 | #:phases | |
880 | (modify-phases %standard-phases | |
881 | (add-after 'unpack 'fix-recognizer | |
882 | (lambda* (#:key inputs #:allow-other-keys) | |
883 | ;; fix missing module and function | |
884 | (substitute* "tegakiwagomu.py" | |
885 | (("import Results,") | |
886 | "import ") | |
887 | (("def _recognize") | |
888 | "def recognize") | |
889 | (("Results\\(candidates\\)") | |
890 | "candidates")) | |
891 | #t))))) | |
892 | (inputs | |
893 | `(("glib" ,glib))) | |
894 | (native-inputs | |
895 | `(("pkg-config" ,pkg-config) | |
896 | ("swig" ,swig))) | |
897 | (home-page "https://tegaki.github.io/") | |
898 | (synopsis | |
899 | "Chinese and Japanese Handwriting Recognition (Recognition engine)") | |
900 | (description | |
901 | "Tegaki is an ongoing project which aims to develop a free and open-source | |
902 | modern implementation of handwriting recognition software, specifically | |
903 | designed for Chinese (simplified and traditional) and Japanese, and that is | |
904 | suitable for both the desktop and mobile devices.") | |
cfcf9dea | 905 | (license license:gpl2+))) ; all files |
c2810523 AV |
906 | |
907 | (define-public python2-tegaki-python | |
908 | (package | |
909 | (inherit python2-tegaki-wagomu) | |
910 | (name "python2-tegaki-python") | |
911 | (version "0.3.1") | |
912 | (source | |
913 | (origin | |
914 | (method url-fetch) | |
915 | (uri (tegaki-release-uri "tegaki-python" version)) | |
916 | (sha256 | |
917 | (base32 | |
918 | "0x93k7pw9nh0ywd97pr8pm7jv3f94nw044i5k0zvzhdpsjqvak7p")) | |
919 | (modules remove-pre-compiled-files-modules) | |
920 | (snippet (remove-pre-compiled-files "pyc")))) | |
921 | (arguments | |
922 | (substitute-keyword-arguments (package-arguments python2-tegaki-wagomu) | |
923 | ((#:phases _) | |
924 | `(modify-phases %standard-phases | |
925 | (add-after 'unpack 'pre-configure | |
926 | (lambda* (#:key inputs #:allow-other-keys) | |
927 | ;; Always convert string to unicode to avoid the following error | |
928 | ;; when running "tegaki-build" in python2-tegaki-tools: | |
929 | ;; | |
930 | ;; sqlite3.ProgrammingError: You must not use 8-bit bytestrings | |
931 | ;; unless you use a text_factory that can interpret 8-bit | |
932 | ;; bytestrings (like text_factory = str). | |
933 | ;; It is highly recommended that you instead just switch your | |
934 | ;; application to Unicode strings. | |
935 | (substitute* "tegaki/charcol.py" | |
936 | (("sqlite3.OptimizedUnicode") | |
937 | "lambda s: unicode(s, 'utf-8')")) | |
938 | (substitute* "tegaki/engine.py" | |
939 | (("/usr(/local)?") | |
940 | (assoc-ref inputs "python2-tegaki-wagomu"))) | |
941 | #t)))))) | |
942 | ;; override inherited inputs | |
943 | (inputs '()) | |
944 | (native-inputs '()) | |
945 | (propagated-inputs | |
946 | `(("python2-tegaki-wagomu" ,python2-tegaki-wagomu) | |
947 | ("python2-zinnia" ,python2-zinnia))) | |
948 | (synopsis | |
949 | "Chinese and Japanese Handwriting Recognition (Base python library)") | |
cfcf9dea TGR |
950 | (license (list license:gpl2+ ; all files except... |
951 | license:bsd-3 ; dictutils.py | |
952 | license:zpl2.1)))) ; minjson.py | |
58ac9289 AV |
953 | |
954 | (define-public python2-tegaki-pygtk | |
955 | (package | |
956 | (inherit python2-tegaki-wagomu) | |
957 | (name "python2-tegaki-pygtk") | |
958 | (version "0.3.1") | |
959 | (source | |
960 | (origin | |
961 | (method url-fetch) | |
962 | (uri (tegaki-release-uri "tegaki-pygtk" version)) | |
963 | (sha256 | |
964 | (base32 | |
965 | "1cip0azxhjdj2dg2z85cp1z3lz4qwx3w1j7z4xmcm7npapmsaqs2")) | |
966 | (modules remove-pre-compiled-files-modules) | |
967 | (snippet (remove-pre-compiled-files "pyc")))) | |
968 | (arguments | |
969 | (substitute-keyword-arguments (package-arguments python2-tegaki-wagomu) | |
970 | ((#:phases _) | |
971 | `(modify-phases %standard-phases | |
972 | (add-after 'unpack 'fix-paths | |
973 | (lambda* (#:key inputs #:allow-other-keys) | |
974 | (substitute* "tegakigtk/fakekey.py" | |
975 | (("libX11.so.6" so) | |
976 | (string-append (assoc-ref inputs "libx11") "/lib/" so)) | |
977 | (("libXtst.so.6" so) | |
978 | (string-append (assoc-ref inputs "libxtst") "/lib/" so))) | |
979 | #t)))))) | |
980 | (inputs ; required for sending key strokes | |
981 | `(("libx11" ,libx11) | |
982 | ("libxtst" ,libxtst))) | |
983 | (native-inputs '()) ; override inherited inputs | |
984 | (propagated-inputs | |
985 | `(("python2-pygtk" ,python2-pygtk) | |
986 | ("python2-tegaki-python" ,python2-tegaki-python))) | |
987 | (synopsis "Chinese and Japanese Handwriting Recognition (Base UI library)") | |
cfcf9dea | 988 | (license license:gpl2+))) |
dd97a9c4 AV |
989 | |
990 | (define-public python2-tegaki-tools | |
991 | (package | |
992 | (inherit python2-tegaki-wagomu) | |
993 | (name "python2-tegaki-tools") | |
994 | (version "0.3.1") | |
995 | (source | |
996 | (origin | |
997 | (method url-fetch) | |
998 | (uri (tegaki-release-uri "tegaki-tools" version)) | |
999 | (sha256 | |
1000 | (base32 | |
1001 | "0xxv97ggh2jgldw3r7y59lv3fhz733r6l7mdn6nh4m0gvb0ja971")) | |
1002 | (modules remove-pre-compiled-files-modules) | |
1003 | (snippet (remove-pre-compiled-files "pyc")))) | |
1004 | (arguments | |
1005 | (substitute-keyword-arguments (package-arguments python2-tegaki-wagomu) | |
1006 | ((#:phases _) '%standard-phases))) | |
1007 | (inputs | |
1008 | `(("python2-tegaki-pygtk" ,python2-tegaki-pygtk))) | |
1009 | ;; override inherited inputs | |
1010 | (native-inputs '()) | |
1011 | (propagated-inputs '()) | |
1012 | (synopsis "Chinese and Japanese Handwriting Recognition (Advanced tools)") | |
1013 | ;; Files in gifenc/ are licensed under gpl3+ while other files are licensed | |
1014 | ;; under gpl2+. Therefore, the combined work is licensed under gpl3+. | |
cfcf9dea | 1015 | (license license:gpl3+))) |
e4f72a58 AV |
1016 | |
1017 | (define-public python2-tegaki-recognize | |
1018 | (let ((commit "eceec69fe651d0733c8c8752dae569d2283d0f3c") | |
1019 | (revision "1")) | |
1020 | (package | |
1021 | (inherit python2-tegaki-tools) | |
1022 | (name "python2-tegaki-recognize") | |
1023 | ;; version copied from <https://github.com/tegaki/tegaki/releases> | |
1024 | (version (git-version "0.3.1" revision commit)) | |
1025 | (source | |
1026 | (origin | |
1027 | ;; We use GIT-FETCH because 'tegaki-recognize.desktop.in' and | |
1028 | ;; 'tegaki-recognize.in' are missing in the tarball. | |
1029 | (method git-fetch) | |
1030 | (uri (git-reference | |
b0e7b699 | 1031 | (url "https://github.com/tegaki/tegaki") |
e4f72a58 AV |
1032 | (commit commit))) |
1033 | (sha256 | |
1034 | (base32 | |
1035 | "09mw2if9p885phbgah5f95q3fwy7s5b46qlmpxqyzfcnj6g7afr5")) | |
1036 | (file-name (git-file-name name version)) | |
1037 | (modules `((guix build utils) | |
1038 | (ice-9 ftw) | |
1039 | (srfi srfi-26) | |
1040 | ,@remove-pre-compiled-files-modules)) | |
1041 | (snippet | |
1042 | `(begin | |
1043 | ;; remove unnecessary files with potentially different license | |
1044 | (for-each delete-file-recursively | |
1045 | (scandir "." | |
1046 | (negate (cut member <> '("tegaki-recognize" | |
1047 | "." ".."))))) | |
1048 | ,(remove-pre-compiled-files "pyc") | |
1049 | #t)))) | |
1050 | (arguments | |
1051 | (substitute-keyword-arguments (package-arguments python2-tegaki-tools) | |
1052 | ((#:phases _) | |
1053 | `(modify-phases %standard-phases | |
1054 | (add-after 'unpack 'chdir | |
1055 | (lambda _ | |
1056 | (chdir "tegaki-recognize") | |
1057 | #t)) | |
1058 | ;; 'setup.py' script does not support one of the Python build | |
1059 | ;; system's default flags, "--single-version-externally-managed" | |
1060 | (replace 'install | |
1061 | (lambda* (#:key outputs #:allow-other-keys) | |
1062 | (invoke "python" "setup.py" "install" | |
1063 | (string-append "--prefix=" (assoc-ref outputs "out")) | |
1064 | "--root=/") | |
1065 | #t)))))) | |
1066 | (synopsis "Chinese and Japanese Handwriting Recognition (Main program)") | |
cfcf9dea | 1067 | (license license:gpl2+)))) |
3ed30b88 AV |
1068 | |
1069 | (define-public tegaki-zinnia-japanese | |
1070 | (package | |
1071 | (inherit python2-tegaki-wagomu) | |
1072 | (name "tegaki-zinnia-japanese") | |
1073 | (version "0.3") | |
1074 | (source | |
1075 | (origin | |
1076 | (method url-fetch) | |
1077 | (uri (tegaki-release-uri name version "zip")) | |
1078 | (sha256 | |
1079 | (base32 | |
1080 | "1nmg9acxhcqly9gwkyb9m0hpy76fll91ywk4b1q4xms0ajxip1h7")) | |
1081 | (modules remove-pre-compiled-files-modules) | |
1082 | (snippet (remove-pre-compiled-files "model")))) | |
1083 | (build-system gnu-build-system) | |
1084 | (arguments | |
1085 | `(#:tests? #f ; no tests | |
1086 | #:phases | |
1087 | (modify-phases %standard-phases | |
1088 | (replace 'configure | |
1089 | (lambda* (#:key outputs #:allow-other-keys) | |
1090 | (substitute* "Makefile" | |
1091 | (("/usr/local") | |
1092 | (assoc-ref outputs "out"))) | |
1093 | #t))))) | |
1094 | ;; override inherited inputs | |
1095 | (inputs '()) | |
1096 | (native-inputs | |
1097 | `(("python2-tegaki-tools" ,python2-tegaki-tools))) | |
1098 | (propagated-inputs '()) | |
1099 | (native-search-paths | |
1100 | (list (search-path-specification | |
1101 | (variable "TEGAKI_MODEL_PATH") | |
1102 | (files '("share/tegaki/models"))))) | |
1103 | (synopsis "Chinese and Japanese Handwriting Recognition (Model)") | |
cfcf9dea | 1104 | (license license:lgpl2.1))) |
c8bbd808 AV |
1105 | |
1106 | (define-public tegaki-zinnia-japanese-light | |
1107 | (package | |
1108 | (inherit tegaki-zinnia-japanese) | |
1109 | (name "tegaki-zinnia-japanese-light") | |
1110 | (version "0.3") | |
1111 | (source | |
1112 | (origin | |
1113 | (method url-fetch) | |
1114 | (uri (tegaki-release-uri name version "zip")) | |
1115 | (sha256 | |
1116 | (base32 | |
1117 | "0x0fs29ylqzxd6xvg51h7rigpbisd7q8v11df425ib2j792yfyf8")) | |
1118 | (modules remove-pre-compiled-files-modules) | |
1119 | (snippet (remove-pre-compiled-files "model")))) | |
cfcf9dea | 1120 | (license license:lgpl2.1))) |
5fd56748 AV |
1121 | |
1122 | (define-public tegaki-zinnia-japanese-kyoiku | |
1123 | (package | |
1124 | (inherit tegaki-zinnia-japanese) | |
1125 | (name "tegaki-zinnia-japanese-kyoiku") | |
1126 | (version "0.3") | |
1127 | (source | |
1128 | (origin | |
1129 | (method url-fetch) | |
1130 | (uri (tegaki-release-uri name version "zip")) | |
1131 | (sha256 | |
1132 | (base32 | |
1133 | "0am94bcpmbzplxdnwn9gk15sgaizvcfhmv13mk14jjvx3419cvvx")) | |
1134 | (modules remove-pre-compiled-files-modules) | |
1135 | (snippet (remove-pre-compiled-files "model")))) | |
cfcf9dea | 1136 | (license license:lgpl2.1))) |
8955412b AV |
1137 | |
1138 | (define-public tegaki-zinnia-japanese-joyo | |
1139 | (package | |
1140 | (inherit tegaki-zinnia-japanese) | |
1141 | (name "tegaki-zinnia-japanese-joyo") | |
1142 | (version "0.3") | |
1143 | (source | |
1144 | (origin | |
1145 | (method url-fetch) | |
1146 | (uri (tegaki-release-uri name version "zip")) | |
1147 | (sha256 | |
1148 | (base32 | |
1149 | "1v0j40lzdyiz01ayws0b8r7fsdy2mr32658382kz4wyk883wzx2z")) | |
1150 | (modules remove-pre-compiled-files-modules) | |
1151 | (snippet (remove-pre-compiled-files "model")))) | |
cfcf9dea | 1152 | (license license:lgpl2.1))) |
e0679464 AV |
1153 | |
1154 | (define-public tegaki-zinnia-simplified-chinese | |
1155 | (package | |
1156 | (inherit tegaki-zinnia-japanese) | |
1157 | (name "tegaki-zinnia-simplified-chinese") | |
1158 | (version "0.3") | |
1159 | (source | |
1160 | (origin | |
1161 | (method url-fetch) | |
1162 | (uri (tegaki-release-uri name version "zip")) | |
1163 | (sha256 | |
1164 | (base32 | |
1165 | "18wq0jccv7lpnrfnzspyc110d6pj2v1i21xcx4fmgzz1lnln3fs5")) | |
1166 | (modules remove-pre-compiled-files-modules) | |
1167 | (snippet (remove-pre-compiled-files "model")))) | |
cfcf9dea | 1168 | (license license:lgpl2.1))) |
ca1f28bd AV |
1169 | |
1170 | (define-public tegaki-zinnia-simplified-chinese-light | |
1171 | (package | |
1172 | (inherit tegaki-zinnia-japanese) | |
1173 | (name "tegaki-zinnia-simplified-chinese-light") | |
1174 | (version "0.3") | |
1175 | (source | |
1176 | (origin | |
1177 | (method url-fetch) | |
1178 | (uri (tegaki-release-uri name version "zip")) | |
1179 | (sha256 | |
1180 | (base32 | |
1181 | "0v24yf0w0p03lb7fyx128a75mwzad166bigvlbrzqnad789qg1sr")) | |
1182 | (modules remove-pre-compiled-files-modules) | |
1183 | (snippet (remove-pre-compiled-files "model")))) | |
cfcf9dea | 1184 | (license license:lgpl2.1))) |
0bfcc29d AV |
1185 | |
1186 | (define-public tegaki-zinnia-traditional-chinese | |
1187 | (package | |
1188 | (inherit tegaki-zinnia-japanese) | |
1189 | (name "tegaki-zinnia-traditional-chinese") | |
1190 | (version "0.3") | |
1191 | (source | |
1192 | (origin | |
1193 | (method url-fetch) | |
1194 | (uri (tegaki-release-uri name version "zip")) | |
1195 | (sha256 | |
1196 | (base32 | |
1197 | "140nlp6hynrai2svs5670jjfw1za6ayflhyj2dl0bzsfgbk3447l")) | |
1198 | (modules remove-pre-compiled-files-modules) | |
1199 | (snippet (remove-pre-compiled-files "model")))) | |
cfcf9dea | 1200 | (license license:lgpl2.1))) |
caee9806 AV |
1201 | |
1202 | (define-public tegaki-zinnia-traditional-chinese-light | |
1203 | (package | |
1204 | (inherit tegaki-zinnia-japanese) | |
1205 | (name "tegaki-zinnia-traditional-chinese-light") | |
1206 | (version "0.3") | |
1207 | (source | |
1208 | (origin | |
1209 | (method url-fetch) | |
1210 | (uri (tegaki-release-uri name version "zip")) | |
1211 | (sha256 | |
1212 | (base32 | |
1213 | "1m6yk6a57vs9wg5y50qciwi1ahhmklp2mgsjysbj4mnyzv6yhcr2")) | |
1214 | (modules remove-pre-compiled-files-modules) | |
1215 | (snippet (remove-pre-compiled-files "model")))) | |
cfcf9dea | 1216 | (license license:lgpl2.1))) |
6b32e91a AV |
1217 | |
1218 | (define-public tegaki-wagomu-japanese | |
1219 | (package | |
1220 | (inherit tegaki-zinnia-japanese) | |
1221 | (name "tegaki-wagomu-japanese") | |
1222 | (version "0.3") | |
1223 | (source | |
1224 | (origin | |
1225 | (method url-fetch) | |
1226 | (uri (tegaki-release-uri name version "zip")) | |
1227 | (sha256 | |
1228 | (base32 | |
1229 | "0flj5id8xwsn7csrrzqz9prdikswnwm2wms0as2vzdpxzph1az4k")) | |
1230 | (modules remove-pre-compiled-files-modules) | |
1231 | (snippet (remove-pre-compiled-files "model")))) | |
cfcf9dea | 1232 | (license license:lgpl2.1))) |
ee3dc52b AV |
1233 | |
1234 | (define-public tegaki-wagomu-japanese-kyoiku | |
1235 | (package | |
1236 | (inherit tegaki-zinnia-japanese) | |
1237 | (name "tegaki-wagomu-japanese-kyoiku") | |
1238 | (version "0.3") | |
1239 | (source | |
1240 | (origin | |
1241 | (method url-fetch) | |
1242 | (uri (tegaki-release-uri name version "zip")) | |
1243 | (sha256 | |
1244 | (base32 | |
1245 | "0v8crfh8rdf6ndp16g52s5jlrrlwh73xp38zjn5i9dlacx8kfqg1")) | |
1246 | (modules remove-pre-compiled-files-modules) | |
1247 | (snippet (remove-pre-compiled-files "model")))) | |
cfcf9dea | 1248 | (license license:lgpl2.1))) |
7c25904c AV |
1249 | |
1250 | (define-public tegaki-wagomu-japanese-joyo | |
1251 | (package | |
1252 | (inherit tegaki-zinnia-japanese) | |
1253 | (name "tegaki-wagomu-japanese-joyo") | |
1254 | (version "0.3") | |
1255 | (source | |
1256 | (origin | |
1257 | (method url-fetch) | |
1258 | (uri (tegaki-release-uri name version "zip")) | |
1259 | (sha256 | |
1260 | (base32 | |
1261 | "0wk8shpr963zp328g991qs6abpnacq4242003m687z2d6yp7nph2")) | |
1262 | (modules remove-pre-compiled-files-modules) | |
1263 | (snippet (remove-pre-compiled-files "model")))) | |
cfcf9dea | 1264 | (license license:lgpl2.1))) |
708c6857 AV |
1265 | |
1266 | (define-public tegaki-wagomu-simplified-chinese | |
1267 | (package | |
1268 | (inherit tegaki-zinnia-japanese) | |
1269 | (name "tegaki-wagomu-simplified-chinese") | |
1270 | (version "0.3") | |
1271 | (source | |
1272 | (origin | |
1273 | (method url-fetch) | |
1274 | (uri (tegaki-release-uri name version "zip")) | |
1275 | (sha256 | |
1276 | (base32 | |
1277 | "0wqprynigqxqxv128i1smh81gxvmjj056d9qpznxa3n9f5ymlbj6")) | |
1278 | (modules remove-pre-compiled-files-modules) | |
1279 | (snippet (remove-pre-compiled-files "model")))) | |
cfcf9dea | 1280 | (license license:lgpl2.1))) |
0ed97e69 AV |
1281 | |
1282 | ;;; Upstream does not provide the source for tegaki-wagomu-traditional-chinese. | |
1283 | ;;; Therefore, we use the source for tegaki-zinnia-traditional-chinese and | |
1284 | ;;; patch the Makefile accordingly. | |
1285 | (define-public tegaki-wagomu-traditional-chinese | |
1286 | (package | |
1287 | (inherit tegaki-zinnia-traditional-chinese) | |
1288 | (name "tegaki-wagomu-traditional-chinese") | |
1289 | (arguments | |
1290 | (substitute-keyword-arguments | |
1291 | (package-arguments tegaki-zinnia-traditional-chinese) | |
1292 | ((#:phases phases '%standard-phases) | |
1293 | `(modify-phases ,phases | |
1294 | (replace 'configure | |
1295 | (lambda args | |
1296 | (let ((configure (assq-ref ,phases 'configure))) | |
1297 | (apply configure args)) | |
1298 | (substitute* "Makefile" | |
1299 | (("zinnia") "wagomu")) | |
1300 | #t)))))) | |
cfcf9dea | 1301 | (license license:lgpl2.1))) |
1f6f0b6b RW |
1302 | |
1303 | (define-public link-grammar | |
1304 | (package | |
1305 | (name "link-grammar") | |
1306 | (version "5.7.0") | |
1307 | (source (origin | |
1308 | (method url-fetch) | |
1309 | (uri (string-append "https://www.abisource.com/downloads/" | |
1310 | "link-grammar/" version | |
1311 | "/link-grammar-" version ".tar.gz")) | |
1312 | (sha256 | |
1313 | (base32 | |
1314 | "0ak1v469k56v3511kxxkxvx1nw6zcxcl0f1kcvc82ffacqbr4y96")))) | |
1315 | (build-system gnu-build-system) | |
1316 | (home-page "https://www.abisource.com/projects/link-grammar/") | |
1317 | (synopsis "Link grammar parser") | |
1318 | (description "The Link Grammar Parser is a syntactic parser of English, | |
1319 | Russian, Arabic and Persian (and other languages as well), based on Link | |
1320 | Grammar, an original theory of syntax and morphology. Given a sentence, the | |
1321 | system assigns to it a syntactic structure, which consists of a set of | |
1322 | labelled links connecting pairs of words. The parser also produces a | |
1323 | \"constituent\" (HPSG style phrase tree) representation of a sentence (showing | |
1324 | noun phrases, verb phrases, etc.).") | |
cfcf9dea | 1325 | (license license:bsd-3))) |
fa76fb63 JL |
1326 | |
1327 | (define-public praat | |
1328 | (package | |
1329 | (name "praat") | |
d67721ba | 1330 | (version "6.1.30") |
fa76fb63 JL |
1331 | (source (origin |
1332 | (method git-fetch) | |
1333 | (uri (git-reference | |
1334 | (url "https://github.com/praat/praat") | |
1335 | (commit (string-append "v" version)))) | |
1336 | (file-name (git-file-name name version)) | |
1337 | (sha256 | |
1338 | (base32 | |
d67721ba | 1339 | "1pjfifyv3wjn68l3i2dr83xm75nf2kxvfxrk9qqbmwz58p183jw4")))) |
fa76fb63 JL |
1340 | (build-system gnu-build-system) |
1341 | (arguments | |
0e25995a | 1342 | `(#:tests? #f ; no test target |
fa76fb63 JL |
1343 | #:phases |
1344 | (modify-phases %standard-phases | |
1345 | (replace 'configure | |
1346 | (lambda _ | |
1347 | (copy-file "makefiles/makefile.defs.linux.pulse" "makefile.defs") | |
1348 | #t)) | |
1349 | (replace 'install | |
1350 | (lambda* (#:key outputs #:allow-other-keys) | |
1351 | (let* ((out (assoc-ref outputs "out")) | |
1352 | (bin (string-append out "/bin"))) | |
1353 | (mkdir-p bin) | |
1354 | (copy-file "praat" (string-append bin "/praat"))) | |
1355 | #t))))) | |
1356 | (inputs | |
1357 | `(("alsa-lib" ,alsa-lib) | |
1358 | ("gtk" ,gtk+-2) | |
1359 | ("jack" ,jack-1) | |
1360 | ("publesaudio" ,pulseaudio))) | |
1361 | (native-inputs | |
1362 | `(("pkg-config" ,pkg-config))) | |
1cbc8f5f | 1363 | (home-page "https://www.fon.hum.uva.nl/praat/") |
fa76fb63 | 1364 | (synopsis "Doing phonetics by computer") |
7230f6d5 TGR |
1365 | (description "Praat is a tool to perform phonetics tasks. It can do speech |
1366 | analysis (pitch, formant, intensity, ...), speech synthesis, labelling, segmenting | |
fa76fb63 | 1367 | and manipulation.") |
cfcf9dea | 1368 | (license license:gpl2+))) |