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