gnu: linux-libre 5.19: Update to 5.19.14.
[jackhill/guix/guix.git] / gnu / packages / language.scm
CommitLineData
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)
e8122816 51 #:use-module (gnu packages serialization)
410387ad 52 #:use-module (gnu packages swig)
899784fb 53 #:use-module (gnu packages texinfo)
d7de0883 54 #:use-module (gnu packages web)
8205fe44 55 #:use-module (gnu packages xml)
83299e54 56 #:use-module (gnu packages xdisorg)
58ac9289 57 #:use-module (gnu packages xorg)
fc436dba 58 #:use-module (guix packages)
677cb21b
RG
59 #:use-module (guix build-system cmake)
60 #:use-module (guix build-system glib-or-gtk)
3ed30b88 61 #:use-module (guix build-system gnu)
fc436dba 62 #:use-module (guix build-system perl)
410387ad 63 #:use-module (guix build-system python)
677cb21b 64 #:use-module (guix build-system qt)
cfcf9dea 65 #:use-module ((guix licenses) #:prefix license:)
c2810523 66 #:use-module (guix download)
e4f72a58 67 #:use-module (guix git-download)
c2810523 68 #:use-module (guix utils))
fc436dba 69
83299e54
RG
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)
2e9fe98a 87 (outputs '("out" "gtk" "qt" "doc"))
83299e54
RG
88 (arguments
89 `(#:imported-modules
90 (,@%glib-or-gtk-build-system-modules
91 (guix build cmake-build-system)
7f6062c3
DS
92 (guix build qt-build-system)
93 (guix build qt-utils))
83299e54
RG
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
76c32fca
RG
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
83299e54
RG
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")
d468a03a 134 (search-input-file inputs "/share/anthy/anthy.dic")))
83299e54
RG
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\\)")
2e9fe98a 144 (string-append (assoc-ref outputs "gtk")
83299e54
RG
145 "/lib"))
146 (("\\$\\(GTK2_LIBDIR\\)")
2e9fe98a 147 (string-append (assoc-ref outputs "gtk")
83299e54 148 "/lib")))
83299e54
RG
149 (substitute* "modules/clients/qt5/Makefile.am"
150 (("\\$\\(QT5_IM_MODULE_DIR\\)")
2e9fe98a 151 (string-append (assoc-ref outputs "qt")
83299e54
RG
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")
9dea1618 174 ("gtk-doc" ,gtk-doc/stable)
83299e54
RG
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)
ea0a5107 188 ("qtbase" ,qtbase-5)
83299e54
RG
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
8394619b 197 (list glib))
83299e54
RG
198 (synopsis "Lightweight input method framework")
199 (description "Nimf is a lightweight, fast and extensible input method
200framework. This package provides a fork of the original nimf project, that
3fb6d439 201focuses especially on Korean input (Hangul, Hanja, ...).")
83299e54 202 (home-page "https://github.com/hamonikr/nimf/")
cfcf9dea 203 (license license:lgpl3+)))
83299e54 204
677cb21b
RG
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)
d9c40090
DS
227 (guix build qt-build-system)
228 (guix build qt-utils))
677cb21b
RG
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+)
ea0a5107 260 ("qtbase" ,qtbase-5)
677cb21b
RG
261 ("xtst" ,libxtst)))
262 (synopsis "HIME Input Method Editor")
263 (description "Hime is an extremely easy-to-use input method framework. It
264is lightweight, stable, powerful and supports many commonly used input methods,
265including Cangjie, Zhuyin, Dayi, Ranked, Shrimp, Greek, Anthy, Korean, Latin,
266Random Cage Fighting Birds, Cool Music etc.")
267 (home-page "http://hime-ime.github.io/")
cfcf9dea
TGR
268 (license (list license:gpl2+ license:lgpl2.1+
269 license:fdl1.2+)))) ; documentation
677cb21b 270
823b27d9
RG
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
63c237d0
JB
289 `(;; test-easy-symbol and test-fullshape fail with multiple cores.
290 #:parallel-tests? #f
291 #:phases
823b27d9
RG
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
8394619b 324 (list ncurses sqlite))
823b27d9
RG
325 (synopsis "Chinese phonetic input method")
326 (description "Chewing is an intelligent phonetic (Zhuyin/Bopomofo) input
327method, one of the most popular choices for Traditional Chinese users.")
328 (home-page "http://chewing.im/")
cfcf9dea 329 (license license:lgpl2.1+)))
823b27d9 330
899784fb
RG
331(define-public liblouis
332 (package
333 (name "liblouis")
b4fb61f6 334 (version "3.15.0")
899784fb
RG
335 (source
336 (origin
337 (method git-fetch)
338 (uri
339 (git-reference
8ed4c468 340 (url "https://github.com/liblouis/liblouis")
899784fb
RG
341 (commit (string-append "v" version))))
342 (file-name (git-file-name name version))
343 (sha256
b4fb61f6 344 (base32 "1ljy5xsy7vf2r0ix0d7bqcr6qvr6897f8madsx9zlm1mrj31n5px"))))
899784fb
RG
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
899784fb
RG
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
374honor of Louis Braille. It features support for computer and literary braille,
375supports contracted and uncontracted translation for many languages and has
376support for hyphenation. New languages can easily be added through tables that
377support a rule- or dictionary based approach. Tools for testing and debugging
378tables are also included. Liblouis also supports math braille, Nemeth and
379Marburg.")
380 (home-page "http://liblouis.org/")
cfcf9dea
TGR
381 (license (list license:lgpl2.1+ ; library
382 license:gpl3+)))) ; tools
899784fb 383
8205fe44
RG
384(define-public liblouisutdml
385 (package
386 (name "liblouisutdml")
433b391f 387 (version "2.9.0")
8205fe44
RG
388 (source
389 (origin
390 (method git-fetch)
391 (uri
392 (git-reference
8ed4c468 393 (url "https://github.com/liblouis/liblouisutdml")
8205fe44
RG
394 (commit (string-append "v" version))))
395 (file-name (git-file-name name version))
396 (sha256
433b391f 397 (base32 "0c32cfcfp0lyfd655c9ihhh3p7lhrb9q3xbll7q5dw4km86gaq6w"))))
8205fe44
RG
398 (build-system gnu-build-system)
399 (outputs '("out" "bin" "doc"))
400 (arguments
401 `(#:configure-flags
433b391f 402 (list "--disable-static")))
8205fe44
RG
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
8394619b 412 (list libxml2))
8205fe44
RG
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
418transcription services for xml, html and text documents. It translates into
419appropriate braille codes and formats according to its style sheet and the
420specifications in the document.")
421 (home-page "http://liblouis.org/")
cfcf9dea
TGR
422 (license (list license:lgpl3+ ; library
423 license:gpl3+)))) ; tools
8205fe44 424
a29eb739
RG
425(define-public libstemmer
426 (package
427 (name "libstemmer")
d57427af 428 (version "2.2.0")
a29eb739
RG
429 (source
430 (origin
431 (method url-fetch)
d57427af
MB
432 (uri (string-append "https://snowballstem.org/dist/libstemmer_c-"
433 version ".tar.gz"))
a29eb739 434 (sha256
d57427af 435 (base32 "1hvphdl8pfq1q3cgh7bshsabsxc7id6wswrqilplwszkkkzdjhdr"))))
a29eb739
RG
436 (build-system gnu-build-system)
437 (arguments
438 `(#:tests? #f ; No tests exist
439 #:make-flags
440 (list
441 (string-append "CC=" ,(cc-for-target))
442 "CFLAGS=-fPIC")
443 #:phases
444 (modify-phases %standard-phases
445 (delete 'configure)
446 (replace 'install
447 (lambda* (#:key outputs #:allow-other-keys)
448 (let* ((out (assoc-ref outputs "out"))
449 (out-bin (string-append out "/bin"))
450 (out-include (string-append out "/include"))
451 (out-lib (string-append out "/lib")))
452 (install-file "stemwords" out-bin)
453 (install-file "include/libstemmer.h" out-include)
d57427af 454 (install-file "libstemmer.a" out-lib)))))))
a29eb739
RG
455 (synopsis "Stemming Library")
456 (description "LibStemmer provides stemming library, supporting several
457languages.")
458 (home-page "https://snowballstem.org/")
d4640281
MB
459 (properties
460 '((release-monitoring-url . "https://snowballstem.org/download.html")
461 (upstream-name . "libstemmer_c")))
cfcf9dea 462 (license license:bsd-3)))
a29eb739 463
0c32bf01
EB
464(define-public perl-lingua-en-findnumber
465 (package
466 (name "perl-lingua-en-findnumber")
84f06e54 467 (version "1.32")
0c32bf01
EB
468 (source
469 (origin
470 (method url-fetch)
471 (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
472 "Lingua-EN-FindNumber-" version ".tar.gz"))
473 (sha256
474 (base32
84f06e54 475 "015ximzdp42v824llwlg2pd77vd0d172lb4xs55q9f9zhqf6s5qx"))))
0c32bf01
EB
476 (build-system perl-build-system)
477 (propagated-inputs
8394619b 478 (list perl-lingua-en-words2nums))
9aba9b12 479 (home-page "https://metacpan.org/release/Lingua-EN-FindNumber")
42c4acf0 480 (synopsis "Locate (written) numbers in English text")
0c32bf01
EB
481 (description "This module provides a regular expression for finding
482numbers in English text. It also provides functions for extracting and
483manipulating such numbers.")
cfcf9dea 484 (license license:perl-license)))
0c32bf01 485
57ff0e04
EB
486(define-public perl-lingua-en-inflect
487 (package
488 (name "perl-lingua-en-inflect")
ce0be1bc 489 (version "1.903")
57ff0e04
EB
490 (source
491 (origin
492 (method url-fetch)
493 (uri (string-append "mirror://cpan/authors/id/D/DC/DCONWAY/"
494 "Lingua-EN-Inflect-" version ".tar.gz"))
495 (sha256
496 (base32
ce0be1bc 497 "0j8d1f1wvmgc11d71pc8xp8fv5a1nb2yfw1dgd19xhscn1klpvzw"))))
57ff0e04 498 (build-system perl-build-system)
8394619b 499 (native-inputs (list perl-module-build))
9aba9b12 500 (home-page "https://metacpan.org/release/Lingua-EN-Inflect")
57ff0e04
EB
501 (synopsis "Convert singular to plural")
502 (description "Lingua::EN::Inflect provides plural inflections,
503\"a\"/\"an\" selection for English words, and manipulation of numbers as
504words. Plural forms of all nouns, most verbs, and some adjectives are
505provided. Where appropriate, \"classical\" variants (for example: \"brother\"
506-> \"brethren\", \"dogma\" -> \"dogmata\", etc.) are also provided.")
cfcf9dea 507 (license license:perl-license)))
57ff0e04 508
4812a813
EB
509(define-public perl-lingua-en-inflect-number
510 (package
511 (name "perl-lingua-en-inflect-number")
e2fb341f 512 (version "1.12")
4812a813
EB
513 (source
514 (origin
515 (method url-fetch)
516 (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
517 "Lingua-EN-Inflect-Number-" version ".tar.gz"))
518 (sha256
519 (base32
e2fb341f 520 "1gxccynkaqav43ww43jp4rzkyr36x97jd03yb5f6yx0jhn1k7yv6"))))
4812a813
EB
521 (build-system perl-build-system)
522 (propagated-inputs
8394619b 523 (list perl-lingua-en-inflect))
9aba9b12 524 (home-page "https://metacpan.org/release/Lingua-EN-Inflect-Number")
4812a813
EB
525 (synopsis "Force number of words to singular or plural")
526 (description "This module extends the functionality of Lingua::EN::Inflect
527with three new functions for determining plurality of a word and forcefully
528converting a word to singular or plural.")
cfcf9dea 529 (license license:perl-license)))
4812a813 530
cfed969c
EB
531(define-public perl-lingua-en-inflect-phrase
532 (package
533 (name "perl-lingua-en-inflect-phrase")
cd75b642 534 (version "0.20")
cfed969c
EB
535 (source
536 (origin
537 (method url-fetch)
538 (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/"
539 "Lingua-EN-Inflect-Phrase-" version ".tar.gz"))
540 (sha256
541 (base32
cd75b642 542 "1a6y1l2pjim2242wcpgz066di4pbzfgsjjdl7vg5a5wzm48qj1am"))))
cfed969c
EB
543 (build-system perl-build-system)
544 (native-inputs
8394619b 545 (list perl-test-nowarnings))
cfed969c 546 (propagated-inputs
8394619b
LC
547 (list perl-lingua-en-findnumber perl-lingua-en-inflect
548 perl-lingua-en-inflect-number perl-lingua-en-number-isordinal
549 perl-lingua-en-tagger))
9aba9b12 550 (home-page "https://metacpan.org/release/Lingua-EN-Inflect-Phrase")
cfed969c
EB
551 (synopsis "Inflect short English phrases")
552 (description "This module attempts to pluralize or singularize short
553English phrases.")
cfcf9dea 554 (license license:perl-license)))
cfed969c 555
930768b3
EB
556(define-public perl-lingua-en-number-isordinal
557 (package
558 (name "perl-lingua-en-number-isordinal")
5b5b4edf 559 (version "0.05")
930768b3
EB
560 (source
561 (origin
562 (method url-fetch)
563 (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/"
564 "Lingua-EN-Number-IsOrdinal-" version ".tar.gz"))
565 (sha256
566 (base32
5b5b4edf 567 "1mhqjvh2ad30gjab5b3a6mbr4aysyrscp4wp42yy5x6001a6km98"))))
930768b3
EB
568 (build-system perl-build-system)
569 (native-inputs
8394619b 570 (list perl-try-tiny perl-test-fatal))
930768b3 571 (propagated-inputs
8394619b 572 (list 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
576digits, 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
8394619b
LC
593 (list perl-memoize-expirelru perl-lingua-stem perl-html-parser
594 perl-html-tagset))
9aba9b12 595 (home-page "https://metacpan.org/release/Lingua-EN-Tagger")
d7de0883
EB
596 (synopsis "Part-of-speech tagger for English natural language processing")
597 (description "This module is a probability based, corpus-trained tagger
598that assigns part-of-speech tags to English text based on a lookup dictionary
599and a set of probability values. The tagger assigns appropriate tags based on
600conditional probabilities - it examines the preceding tag to determine the
601appropriate tag for the current word. Unknown words are classified according
602to word morphology or can be set to be treated as nouns or other parts of
603speech. The tagger also extracts as many nouns and noun phrases as it can,
604using a set of regular expressions.")
cfcf9dea 605 (license license:gpl3)))
d7de0883 606
fc436dba
EB
607(define-public perl-lingua-en-words2nums
608 (package
609 (name "perl-lingua-en-words2nums")
610 (version "0.18")
611 (source
612 (origin
613 (method url-fetch)
614 (uri (string-append "mirror://cpan/authors/id/J/JO/JOEY/"
615 "Lingua-EN-Words2Nums-" version ".tar.gz"))
616 (sha256
617 (base32
618 "118xx8qr1zbx30psv7ic55w65h15mc1vz6zicshfm96jgiwmcrb8"))))
619 (build-system perl-build-system)
9aba9b12 620 (home-page "https://metacpan.org/release/Lingua-EN-Words2Nums")
fc436dba
EB
621 (synopsis "Convert English text to numbers")
622 (description "This module converts English text into numbers. It supports
623both ordinal and cardinal numbers, negative numbers, and very large numbers.")
cfcf9dea 624 (license license:perl-license)))
9b446711
EB
625
626(define-public perl-lingua-pt-stemmer
627 (package
628 (name "perl-lingua-pt-stemmer")
8895a968 629 (version "0.02")
9b446711
EB
630 (source
631 (origin
632 (method url-fetch)
e8409dd2 633 (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
9b446711
EB
634 "Lingua-PT-Stemmer-" version ".tar.gz"))
635 (sha256
636 (base32
8895a968 637 "17c48sfbgwd2ivlgf59sr6jdhwa3aim8750f8pyzz7xpi8gz0var"))))
9b446711 638 (build-system perl-build-system)
9aba9b12 639 (home-page "https://metacpan.org/release/Lingua-PT-Stemmer")
9b446711
EB
640 (synopsis "Portuguese language stemming")
641 (description "This module implements a Portuguese stemming algorithm
642proposed in the paper A Stemming Algorithm for the Portuguese Language by
643Moreira, V. and Huyck, C.")
cfcf9dea 644 (license license:perl-license)))
df11e052 645
9766e4fe
EB
646(define-public perl-lingua-stem
647 (package
648 (name "perl-lingua-stem")
649 (version "0.84")
650 (source
651 (origin
652 (method url-fetch)
653 (uri (string-append "mirror://cpan/authors/id/S/SN/SNOWHARE/"
654 "Lingua-Stem-" version ".tar.gz"))
655 (sha256
656 (base32
657 "12avh2mnnc7llmmshrr5bgb473fvydxnlqrqbl2815mf2dp4pxcg"))))
658 (build-system perl-build-system)
a2190ccc 659 (native-inputs
8394619b 660 (list perl-module-build))
9766e4fe 661 (propagated-inputs
8394619b
LC
662 (list perl-lingua-pt-stemmer
663 perl-lingua-stem-fr
664 perl-lingua-stem-it
665 perl-lingua-stem-ru
666 perl-lingua-stem-snowball-da
667 perl-snowball-norwegian
668 perl-snowball-swedish
669 perl-text-german))
9aba9b12 670 (home-page "https://metacpan.org/release/Lingua-Stem")
9766e4fe
EB
671 (synopsis "Stemming of words in various languages")
672 (description "This routine applies stemming algorithms to its parameters,
673returning the stemmed words as appropriate to the selected locale.")
cfcf9dea 674 (license license:perl-license)))
9766e4fe 675
df11e052
EB
676(define-public perl-lingua-stem-fr
677 (package
678 (name "perl-lingua-stem-fr")
679 (version "0.02")
680 (source
681 (origin
682 (method url-fetch)
683 (uri (string-append "mirror://cpan/authors/id/S/SD/SDP/"
684 "Lingua-Stem-Fr-" version ".tar.gz"))
685 (sha256
686 (base32
687 "0vyrspwzaqjxm5mqshf4wvwa3938mkajd1918d9ii2l9m2rn8kwx"))))
688 (build-system perl-build-system)
9aba9b12 689 (home-page "https://metacpan.org/release/Lingua-Stem-Fr")
df11e052
EB
690 (synopsis "Porter's stemming algorithm for French")
691 (description "This module uses a modified version of the Porter Stemming
692Algorithm to return a stemmed French word.")
cfcf9dea 693 (license license:perl-license)))
6afe5959
EB
694
695(define-public perl-lingua-stem-it
696 (package
697 (name "perl-lingua-stem-it")
698 (version "0.02")
699 (source
700 (origin
701 (method url-fetch)
702 (uri (string-append "mirror://cpan/authors/id/A/AC/ACALPINI/"
703 "Lingua-Stem-It-" version ".tar.gz"))
704 (sha256
705 (base32
706 "1207r183s5hlh4mfwa6p46vzm0dhvrs2dnss5s41a0gyfkxp7riq"))))
707 (build-system perl-build-system)
9aba9b12 708 (home-page "https://metacpan.org/release/Lingua-Stem-It")
6afe5959
EB
709 (synopsis "Porter's stemming algorithm for Italian")
710 (description "This module applies the Porter Stemming Algorithm to its
711parameters, returning the stemmed Italian word.")
cfcf9dea 712 (license license:perl-license)))
95d2eec1
EB
713
714(define-public perl-lingua-stem-ru
715 (package
716 (name "perl-lingua-stem-ru")
a4b7142e 717 (version "0.04")
95d2eec1
EB
718 (source
719 (origin
720 (method url-fetch)
a4b7142e 721 (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
95d2eec1
EB
722 "Lingua-Stem-Ru-" version ".tar.gz"))
723 (sha256
724 (base32
a4b7142e 725 "0a2jmdz7jn32qj5hyiw5kbv8fvlpmws8i00a6xcbkzb48yvwww0j"))))
95d2eec1 726 (build-system perl-build-system)
9aba9b12 727 (home-page "https://metacpan.org/release/Lingua-Stem-Ru")
95d2eec1
EB
728 (synopsis "Porter's stemming algorithm for Russian")
729 (description "This module applies the Porter Stemming Algorithm to its
730parameters, returning the stemmed Russian (KOI8-R only) word.")
cfcf9dea 731 (license license:perl-license)))
30c40044
EB
732
733(define-public perl-lingua-stem-snowball-da
734 (package
735 (name "perl-lingua-stem-snowball-da")
736 (version "1.01")
737 (source
738 (origin
739 (method url-fetch)
740 (uri (string-append "mirror://cpan/authors/id/C/CI/CINE/"
741 "Lingua-Stem-Snowball-Da-" version ".tar.gz"))
742 (sha256
743 (base32
744 "0mm0m7glm1s6i9f6a78jslw6wh573208arxhq93yriqmw17bwf9f"))))
745 (build-system perl-build-system)
9aba9b12 746 (home-page "https://metacpan.org/release/Lingua-Stem-Snowball-Da")
30c40044
EB
747 (synopsis "Porters stemming algorithm for Danish")
748 (description "Lingua::Stem::Snowball::Da is a perl port of the danish
749stemmer at http://snowball.sourceforge.net, it was originally altered from the
750Lingua::Stem::Snowball::Se.")
cfcf9dea 751 (license license:gpl2)))
1064abdc
EB
752
753(define-public perl-snowball-norwegian
754 (package
755 (name "perl-snowball-norwegian")
756 (version "1.2")
757 (source
758 (origin
759 (method url-fetch)
760 (uri (string-append "mirror://cpan/authors/id/A/AS/ASKSH/"
761 "Snowball-Norwegian-" version ".tar.gz"))
762 (sha256
763 (base32
764 "0675v45bbsh7vr7kpf36xs2q79g02iq1kmfw22h20xdk4rzqvkqx"))))
765 (build-system perl-build-system)
8394619b 766 (native-inputs (list perl-module-build))
9aba9b12 767 (home-page "https://metacpan.org/release/Snowball-Norwegian")
1064abdc
EB
768 (synopsis "Porters stemming algorithm for Norwegian")
769 (description "Lingua::Stem::Snowball::No is a perl port of the norwegian
770stemmer at http://snowball.tartarus.org.")
cfcf9dea 771 (license license:perl-license)))
1f4b1129
EB
772
773(define-public perl-snowball-swedish
774 (package
775 (name "perl-snowball-swedish")
776 (version "1.2")
777 (source
778 (origin
779 (method url-fetch)
780 (uri (string-append "mirror://cpan/authors/id/A/AS/ASKSH/"
781 "Snowball-Swedish-" version ".tar.gz"))
782 (sha256
783 (base32
784 "0agwc12jk5kmabnpsplw3wf4ii5w1zb159cpin44x3srb0sr5apg"))))
785 (build-system perl-build-system)
8394619b 786 (native-inputs (list perl-module-build))
9aba9b12 787 (home-page "https://metacpan.org/release/Snowball-Swedish")
1f4b1129
EB
788 (synopsis "Porters stemming algorithm for Swedish")
789 (description "Lingua::Stem::Snowball::Se is a perl port of the swedish
790stemmer at http://snowball.sourceforge.net.")
cfcf9dea 791 (license license:perl-license)))
2b83abae 792
f3bbbb73
EB
793(define-public perl-string-toidentifier-en
794 (package
795 (name "perl-string-toidentifier-en")
97c79494 796 (version "0.12")
f3bbbb73
EB
797 (source
798 (origin
799 (method url-fetch)
800 (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/"
801 "String-ToIdentifier-EN-" version ".tar.gz"))
802 (sha256
803 (base32
97c79494 804 "12nw7h2yiybhdw0vnnpc7bif8ylhsn6kqf6s39dsrf9h54iq9yrs"))))
f3bbbb73
EB
805 (build-system perl-build-system)
806 (propagated-inputs
8394619b
LC
807 (list perl-lingua-en-inflect-phrase perl-text-unidecode
808 perl-namespace-clean))
9aba9b12 809 (home-page "https://metacpan.org/release/String-ToIdentifier-EN")
e881752c 810 (synopsis "Convert strings to English program identifiers")
f3bbbb73
EB
811 (description "This module provides a utility method, \"to_identifier\" for
812converting an arbitrary string into a readable representation using the ASCII
813subset of \"\\w\" for use as an identifier in a computer program. The intent
814is to make unique identifier names from which the content of the original
815string can be easily inferred by a human just by reading the identifier.")
cfcf9dea 816 (license license:perl-license)))
f3bbbb73 817
2b83abae
EB
818(define-public perl-text-german
819 (package
820 (name "perl-text-german")
821 (version "0.06")
822 (source
823 (origin
824 (method url-fetch)
825 (uri (string-append "mirror://cpan/authors/id/U/UL/ULPFR/"
826 "Text-German-" version ".tar.gz"))
827 (sha256
828 (base32
829 "1p87pgap99lw0nv62i3ghvsi7yg90lhn8vsa3yqp75rd04clybcj"))))
830 (build-system perl-build-system)
9aba9b12 831 (home-page "https://metacpan.org/release/Text-German")
2b83abae 832 (synopsis "German grundform reduction")
e881752c 833 (description "This module is a rather incomplete implementation of work
2b83abae 834done by Gudrun Putze-Meier.")
cfcf9dea 835 (license license:perl-license)))
410387ad
AV
836
837(define* (tegaki-release-uri proj version
838 #:optional (ext "tar.gz"))
839 (string-append "https://github.com/tegaki/tegaki/releases/download"
840 "/v" version "/" proj "-" version "." ext))
841
842(define remove-pre-compiled-files
843 (lambda exts
844 "Return snippet for removing pre-compiled files matching one of the
845extensions in EXTS."
846 `(begin (for-each delete-file
847 (find-files "."
848 (lambda (name _)
849 (any (cut string-suffix? <> name)
850 (map (cut string-append "." <>)
851 ',exts)))))
852 #t)))
853
854;;; modules required for the above snippet
855(define remove-pre-compiled-files-modules
856 '((guix build utils)
857 (srfi srfi-1)
858 (srfi srfi-26)))
859
1f6f0b6b
RW
860(define-public link-grammar
861 (package
862 (name "link-grammar")
863 (version "5.7.0")
864 (source (origin
865 (method url-fetch)
866 (uri (string-append "https://www.abisource.com/downloads/"
867 "link-grammar/" version
868 "/link-grammar-" version ".tar.gz"))
869 (sha256
870 (base32
871 "0ak1v469k56v3511kxxkxvx1nw6zcxcl0f1kcvc82ffacqbr4y96"))))
872 (build-system gnu-build-system)
873 (home-page "https://www.abisource.com/projects/link-grammar/")
874 (synopsis "Link grammar parser")
875 (description "The Link Grammar Parser is a syntactic parser of English,
876Russian, Arabic and Persian (and other languages as well), based on Link
877Grammar, an original theory of syntax and morphology. Given a sentence, the
878system assigns to it a syntactic structure, which consists of a set of
879labelled links connecting pairs of words. The parser also produces a
880\"constituent\" (HPSG style phrase tree) representation of a sentence (showing
881noun phrases, verb phrases, etc.).")
cfcf9dea 882 (license license:bsd-3)))
fa76fb63
JL
883
884(define-public praat
885 (package
886 (name "praat")
d67721ba 887 (version "6.1.30")
fa76fb63
JL
888 (source (origin
889 (method git-fetch)
890 (uri (git-reference
891 (url "https://github.com/praat/praat")
892 (commit (string-append "v" version))))
893 (file-name (git-file-name name version))
894 (sha256
895 (base32
d67721ba 896 "1pjfifyv3wjn68l3i2dr83xm75nf2kxvfxrk9qqbmwz58p183jw4"))))
fa76fb63
JL
897 (build-system gnu-build-system)
898 (arguments
0e25995a 899 `(#:tests? #f ; no test target
fa76fb63
JL
900 #:phases
901 (modify-phases %standard-phases
902 (replace 'configure
903 (lambda _
904 (copy-file "makefiles/makefile.defs.linux.pulse" "makefile.defs")
905 #t))
906 (replace 'install
907 (lambda* (#:key outputs #:allow-other-keys)
908 (let* ((out (assoc-ref outputs "out"))
909 (bin (string-append out "/bin")))
910 (mkdir-p bin)
911 (copy-file "praat" (string-append bin "/praat")))
912 #t)))))
913 (inputs
914 `(("alsa-lib" ,alsa-lib)
915 ("gtk" ,gtk+-2)
916 ("jack" ,jack-1)
917 ("publesaudio" ,pulseaudio)))
918 (native-inputs
8394619b 919 (list pkg-config))
1cbc8f5f 920 (home-page "https://www.fon.hum.uva.nl/praat/")
fa76fb63 921 (synopsis "Doing phonetics by computer")
7230f6d5
TGR
922 (description "Praat is a tool to perform phonetics tasks. It can do speech
923analysis (pitch, formant, intensity, ...), speech synthesis, labelling, segmenting
fa76fb63 924and manipulation.")
cfcf9dea 925 (license license:gpl2+)))