1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org>
3 ;;; Copyright © 2017, 2018 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>
8 ;;; This file is part of GNU Guix.
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23 (define-module (gnu packages language)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages glib)
26 #:use-module (gnu packages gtk)
27 #:use-module (gnu packages ocr)
28 #:use-module (gnu packages perl)
29 #:use-module (gnu packages pkg-config)
30 #:use-module (gnu packages python)
31 #:use-module (gnu packages perl-check)
32 #:use-module (gnu packages swig)
33 #:use-module (gnu packages web)
34 #:use-module (gnu packages xorg)
35 #:use-module (guix packages)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system perl)
38 #:use-module (guix build-system python)
39 #:use-module ((guix licenses)
41 (bsd-3 gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 perl-license zpl2.1))
42 #:use-module (guix download)
43 #:use-module (guix git-download)
44 #:use-module (guix utils))
46 (define-public perl-lingua-en-findnumber
48 (name "perl-lingua-en-findnumber")
53 (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
54 "Lingua-EN-FindNumber-" version ".tar.gz"))
57 "015ximzdp42v824llwlg2pd77vd0d172lb4xs55q9f9zhqf6s5qx"))))
58 (build-system perl-build-system)
60 `(("perl-lingua-en-words2nums" ,perl-lingua-en-words2nums)))
61 (home-page "https://metacpan.org/release/Lingua-EN-FindNumber")
62 (synopsis "Locate (written) numbers in English text ")
63 (description "This module provides a regular expression for finding
64 numbers in English text. It also provides functions for extracting and
65 manipulating such numbers.")
66 (license perl-license)))
68 (define-public perl-lingua-en-inflect
70 (name "perl-lingua-en-inflect")
75 (uri (string-append "mirror://cpan/authors/id/D/DC/DCONWAY/"
76 "Lingua-EN-Inflect-" version ".tar.gz"))
79 "0j8d1f1wvmgc11d71pc8xp8fv5a1nb2yfw1dgd19xhscn1klpvzw"))))
80 (build-system perl-build-system)
81 (native-inputs `(("perl-module-build" ,perl-module-build)))
82 (home-page "https://metacpan.org/release/Lingua-EN-Inflect")
83 (synopsis "Convert singular to plural")
84 (description "Lingua::EN::Inflect provides plural inflections,
85 \"a\"/\"an\" selection for English words, and manipulation of numbers as
86 words. Plural forms of all nouns, most verbs, and some adjectives are
87 provided. Where appropriate, \"classical\" variants (for example: \"brother\"
88 -> \"brethren\", \"dogma\" -> \"dogmata\", etc.) are also provided.")
89 (license perl-license)))
91 (define-public perl-lingua-en-inflect-number
93 (name "perl-lingua-en-inflect-number")
98 (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
99 "Lingua-EN-Inflect-Number-" version ".tar.gz"))
102 "1gxccynkaqav43ww43jp4rzkyr36x97jd03yb5f6yx0jhn1k7yv6"))))
103 (build-system perl-build-system)
105 `(("perl-lingua-en-inflect" ,perl-lingua-en-inflect)))
106 (home-page "https://metacpan.org/release/Lingua-EN-Inflect-Number")
107 (synopsis "Force number of words to singular or plural")
108 (description "This module extends the functionality of Lingua::EN::Inflect
109 with three new functions for determining plurality of a word and forcefully
110 converting a word to singular or plural.")
111 (license perl-license)))
113 (define-public perl-lingua-en-inflect-phrase
115 (name "perl-lingua-en-inflect-phrase")
120 (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/"
121 "Lingua-EN-Inflect-Phrase-" version ".tar.gz"))
124 "1a6y1l2pjim2242wcpgz066di4pbzfgsjjdl7vg5a5wzm48qj1am"))))
125 (build-system perl-build-system)
127 `(("perl-test-nowarnings" ,perl-test-nowarnings)))
129 `(("perl-lingua-en-findnumber" ,perl-lingua-en-findnumber)
130 ("perl-lingua-en-inflect" ,perl-lingua-en-inflect)
131 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
132 ("perl-lingua-en-number-isordinal" ,perl-lingua-en-number-isordinal)
133 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)))
134 (home-page "https://metacpan.org/release/Lingua-EN-Inflect-Phrase")
135 (synopsis "Inflect short English phrases")
136 (description "This module attempts to pluralize or singularize short
138 (license perl-license)))
140 (define-public perl-lingua-en-number-isordinal
142 (name "perl-lingua-en-number-isordinal")
147 (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/"
148 "Lingua-EN-Number-IsOrdinal-" version ".tar.gz"))
151 "1mhqjvh2ad30gjab5b3a6mbr4aysyrscp4wp42yy5x6001a6km98"))))
152 (build-system perl-build-system)
154 `(("perl-try-tiny" ,perl-try-tiny)
155 ("perl-test-fatal" ,perl-test-fatal)))
157 `(("perl-lingua-en-findnumber" ,perl-lingua-en-findnumber)))
158 (home-page "https://metacpan.org/release/Lingua-EN-Number-IsOrdinal")
159 (synopsis "Detect if English number is ordinal or cardinal")
160 (description "This module will tell you if a number, either in words or as
161 digits, is a cardinal or ordinal number.")
162 (license perl-license)))
164 (define-public perl-lingua-en-tagger
166 (name "perl-lingua-en-tagger")
171 (uri (string-append "mirror://cpan/authors/id/A/AC/ACOBURN/"
172 "Lingua-EN-Tagger-" version ".tar.gz"))
175 "0nrnkvsf9f0a7lp82sanmy89ms2nqq1lvjqicvsagsvzp513bl5b"))))
176 (build-system perl-build-system)
178 `(("perl-memoize-expirelru" ,perl-memoize-expirelru)
179 ("perl-lingua-stem" ,perl-lingua-stem)
180 ("perl-html-parser" ,perl-html-parser)
181 ("perl-html-tagset" ,perl-html-tagset)))
182 (home-page "https://metacpan.org/release/Lingua-EN-Tagger")
183 (synopsis "Part-of-speech tagger for English natural language processing")
184 (description "This module is a probability based, corpus-trained tagger
185 that assigns part-of-speech tags to English text based on a lookup dictionary
186 and a set of probability values. The tagger assigns appropriate tags based on
187 conditional probabilities - it examines the preceding tag to determine the
188 appropriate tag for the current word. Unknown words are classified according
189 to word morphology or can be set to be treated as nouns or other parts of
190 speech. The tagger also extracts as many nouns and noun phrases as it can,
191 using a set of regular expressions.")
194 (define-public perl-lingua-en-words2nums
196 (name "perl-lingua-en-words2nums")
201 (uri (string-append "mirror://cpan/authors/id/J/JO/JOEY/"
202 "Lingua-EN-Words2Nums-" version ".tar.gz"))
205 "118xx8qr1zbx30psv7ic55w65h15mc1vz6zicshfm96jgiwmcrb8"))))
206 (build-system perl-build-system)
207 (home-page "https://metacpan.org/release/Lingua-EN-Words2Nums")
208 (synopsis "Convert English text to numbers")
209 (description "This module converts English text into numbers. It supports
210 both ordinal and cardinal numbers, negative numbers, and very large numbers.")
211 (license perl-license)))
213 (define-public perl-lingua-pt-stemmer
215 (name "perl-lingua-pt-stemmer")
220 (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
221 "Lingua-PT-Stemmer-" version ".tar.gz"))
224 "17c48sfbgwd2ivlgf59sr6jdhwa3aim8750f8pyzz7xpi8gz0var"))))
225 (build-system perl-build-system)
226 (home-page "https://metacpan.org/release/Lingua-PT-Stemmer")
227 (synopsis "Portuguese language stemming")
228 (description "This module implements a Portuguese stemming algorithm
229 proposed in the paper A Stemming Algorithm for the Portuguese Language by
230 Moreira, V. and Huyck, C.")
231 (license perl-license)))
233 (define-public perl-lingua-stem
235 (name "perl-lingua-stem")
240 (uri (string-append "mirror://cpan/authors/id/S/SN/SNOWHARE/"
241 "Lingua-Stem-" version ".tar.gz"))
244 "12avh2mnnc7llmmshrr5bgb473fvydxnlqrqbl2815mf2dp4pxcg"))))
245 (build-system perl-build-system)
247 `(("perl-module-build" ,perl-module-build)))
249 `(("perl-lingua-pt-stemmer" ,perl-lingua-pt-stemmer)
250 ("perl-lingua-stem-fr" ,perl-lingua-stem-fr)
251 ("perl-lingua-stem-it" ,perl-lingua-stem-it)
252 ("perl-lingua-stem-ru" ,perl-lingua-stem-ru)
253 ("perl-lingua-stem-snowball-da" ,perl-lingua-stem-snowball-da)
254 ("perl-snowball-norwegian" ,perl-snowball-norwegian)
255 ("perl-snowball-swedish" ,perl-snowball-swedish)
256 ("perl-text-german" ,perl-text-german)))
257 (home-page "https://metacpan.org/release/Lingua-Stem")
258 (synopsis "Stemming of words in various languages")
259 (description "This routine applies stemming algorithms to its parameters,
260 returning the stemmed words as appropriate to the selected locale.")
261 (license perl-license)))
263 (define-public perl-lingua-stem-fr
265 (name "perl-lingua-stem-fr")
270 (uri (string-append "mirror://cpan/authors/id/S/SD/SDP/"
271 "Lingua-Stem-Fr-" version ".tar.gz"))
274 "0vyrspwzaqjxm5mqshf4wvwa3938mkajd1918d9ii2l9m2rn8kwx"))))
275 (build-system perl-build-system)
276 (home-page "https://metacpan.org/release/Lingua-Stem-Fr")
277 (synopsis "Porter's stemming algorithm for French")
278 (description "This module uses a modified version of the Porter Stemming
279 Algorithm to return a stemmed French word.")
280 (license perl-license)))
282 (define-public perl-lingua-stem-it
284 (name "perl-lingua-stem-it")
289 (uri (string-append "mirror://cpan/authors/id/A/AC/ACALPINI/"
290 "Lingua-Stem-It-" version ".tar.gz"))
293 "1207r183s5hlh4mfwa6p46vzm0dhvrs2dnss5s41a0gyfkxp7riq"))))
294 (build-system perl-build-system)
295 (home-page "https://metacpan.org/release/Lingua-Stem-It")
296 (synopsis "Porter's stemming algorithm for Italian")
297 (description "This module applies the Porter Stemming Algorithm to its
298 parameters, returning the stemmed Italian word.")
299 (license perl-license)))
301 (define-public perl-lingua-stem-ru
303 (name "perl-lingua-stem-ru")
308 (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
309 "Lingua-Stem-Ru-" version ".tar.gz"))
312 "0a2jmdz7jn32qj5hyiw5kbv8fvlpmws8i00a6xcbkzb48yvwww0j"))))
313 (build-system perl-build-system)
314 (home-page "https://metacpan.org/release/Lingua-Stem-Ru")
315 (synopsis "Porter's stemming algorithm for Russian")
316 (description "This module applies the Porter Stemming Algorithm to its
317 parameters, returning the stemmed Russian (KOI8-R only) word.")
318 (license perl-license)))
320 (define-public perl-lingua-stem-snowball-da
322 (name "perl-lingua-stem-snowball-da")
327 (uri (string-append "mirror://cpan/authors/id/C/CI/CINE/"
328 "Lingua-Stem-Snowball-Da-" version ".tar.gz"))
331 "0mm0m7glm1s6i9f6a78jslw6wh573208arxhq93yriqmw17bwf9f"))))
332 (build-system perl-build-system)
333 (home-page "https://metacpan.org/release/Lingua-Stem-Snowball-Da")
334 (synopsis "Porters stemming algorithm for Danish")
335 (description "Lingua::Stem::Snowball::Da is a perl port of the danish
336 stemmer at http://snowball.sourceforge.net, it was originally altered from the
337 Lingua::Stem::Snowball::Se.")
340 (define-public perl-snowball-norwegian
342 (name "perl-snowball-norwegian")
347 (uri (string-append "mirror://cpan/authors/id/A/AS/ASKSH/"
348 "Snowball-Norwegian-" version ".tar.gz"))
351 "0675v45bbsh7vr7kpf36xs2q79g02iq1kmfw22h20xdk4rzqvkqx"))))
352 (build-system perl-build-system)
353 (native-inputs `(("perl-module-build" ,perl-module-build)))
354 (home-page "https://metacpan.org/release/Snowball-Norwegian")
355 (synopsis "Porters stemming algorithm for Norwegian")
356 (description "Lingua::Stem::Snowball::No is a perl port of the norwegian
357 stemmer at http://snowball.tartarus.org.")
358 (license perl-license)))
360 (define-public perl-snowball-swedish
362 (name "perl-snowball-swedish")
367 (uri (string-append "mirror://cpan/authors/id/A/AS/ASKSH/"
368 "Snowball-Swedish-" version ".tar.gz"))
371 "0agwc12jk5kmabnpsplw3wf4ii5w1zb159cpin44x3srb0sr5apg"))))
372 (build-system perl-build-system)
373 (native-inputs `(("perl-module-build" ,perl-module-build)))
374 (home-page "https://metacpan.org/release/Snowball-Swedish")
375 (synopsis "Porters stemming algorithm for Swedish")
376 (description "Lingua::Stem::Snowball::Se is a perl port of the swedish
377 stemmer at http://snowball.sourceforge.net.")
378 (license perl-license)))
380 (define-public perl-string-toidentifier-en
382 (name "perl-string-toidentifier-en")
387 (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/"
388 "String-ToIdentifier-EN-" version ".tar.gz"))
391 "12nw7h2yiybhdw0vnnpc7bif8ylhsn6kqf6s39dsrf9h54iq9yrs"))))
392 (build-system perl-build-system)
394 `(("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
395 ("perl-text-unidecode" ,perl-text-unidecode)
396 ("perl-namespace-clean" ,perl-namespace-clean)))
397 (home-page "https://metacpan.org/release/String-ToIdentifier-EN")
398 (synopsis "Convert strings to English program identifiers")
399 (description "This module provides a utility method, \"to_identifier\" for
400 converting an arbitrary string into a readable representation using the ASCII
401 subset of \"\\w\" for use as an identifier in a computer program. The intent
402 is to make unique identifier names from which the content of the original
403 string can be easily inferred by a human just by reading the identifier.")
404 (license perl-license)))
406 (define-public perl-text-german
408 (name "perl-text-german")
413 (uri (string-append "mirror://cpan/authors/id/U/UL/ULPFR/"
414 "Text-German-" version ".tar.gz"))
417 "1p87pgap99lw0nv62i3ghvsi7yg90lhn8vsa3yqp75rd04clybcj"))))
418 (build-system perl-build-system)
419 (home-page "https://metacpan.org/release/Text-German")
420 (synopsis "German grundform reduction")
421 (description "This module is a rather incomplete implementation of work
422 done by Gudrun Putze-Meier.")
423 (license perl-license)))
425 (define* (tegaki-release-uri proj version
426 #:optional (ext "tar.gz"))
427 (string-append "https://github.com/tegaki/tegaki/releases/download"
428 "/v" version "/" proj "-" version "." ext))
430 (define remove-pre-compiled-files
432 "Return snippet for removing pre-compiled files matching one of the
434 `(begin (for-each delete-file
437 (any (cut string-suffix? <> name)
438 (map (cut string-append "." <>)
442 ;;; modules required for the above snippet
443 (define remove-pre-compiled-files-modules
448 (define-public python2-tegaki-wagomu
450 (name "python2-tegaki-wagomu")
455 (uri (tegaki-release-uri "tegaki-wagomu" version))
458 "1pzdiq4zy1nyylaj9i6v2h4h0r05klahskzpafpp367p4rysi1x9"))
459 (modules remove-pre-compiled-files-modules)
460 (snippet (remove-pre-compiled-files "pyc"))))
461 (build-system python-build-system)
463 `(#:python ,python-2 ; only Python 2 is supported
465 (modify-phases %standard-phases
466 (add-after 'unpack 'fix-recognizer
467 (lambda* (#:key inputs #:allow-other-keys)
468 ;; fix missing module and function
469 (substitute* "tegakiwagomu.py"
474 (("Results\\(candidates\\)")
480 `(("pkg-config" ,pkg-config)
482 (home-page "https://tegaki.github.io/")
484 "Chinese and Japanese Handwriting Recognition (Recognition engine)")
486 "Tegaki is an ongoing project which aims to develop a free and open-source
487 modern implementation of handwriting recognition software, specifically
488 designed for Chinese (simplified and traditional) and Japanese, and that is
489 suitable for both the desktop and mobile devices.")
490 (license gpl2+))) ; all files
492 (define-public python2-tegaki-python
494 (inherit python2-tegaki-wagomu)
495 (name "python2-tegaki-python")
500 (uri (tegaki-release-uri "tegaki-python" version))
503 "0x93k7pw9nh0ywd97pr8pm7jv3f94nw044i5k0zvzhdpsjqvak7p"))
504 (modules remove-pre-compiled-files-modules)
505 (snippet (remove-pre-compiled-files "pyc"))))
507 (substitute-keyword-arguments (package-arguments python2-tegaki-wagomu)
509 `(modify-phases %standard-phases
510 (add-after 'unpack 'pre-configure
511 (lambda* (#:key inputs #:allow-other-keys)
512 ;; Always convert string to unicode to avoid the following error
513 ;; when running "tegaki-build" in python2-tegaki-tools:
515 ;; sqlite3.ProgrammingError: You must not use 8-bit bytestrings
516 ;; unless you use a text_factory that can interpret 8-bit
517 ;; bytestrings (like text_factory = str).
518 ;; It is highly recommended that you instead just switch your
519 ;; application to Unicode strings.
520 (substitute* "tegaki/charcol.py"
521 (("sqlite3.OptimizedUnicode")
522 "lambda s: unicode(s, 'utf-8')"))
523 (substitute* "tegaki/engine.py"
525 (assoc-ref inputs "python2-tegaki-wagomu")))
527 ;; override inherited inputs
531 `(("python2-tegaki-wagomu" ,python2-tegaki-wagomu)
532 ("python2-zinnia" ,python2-zinnia)))
534 "Chinese and Japanese Handwriting Recognition (Base python library)")
535 (license (list gpl2+ ; all files except...
537 zpl2.1)))) ; minjson.py
539 (define-public python2-tegaki-pygtk
541 (inherit python2-tegaki-wagomu)
542 (name "python2-tegaki-pygtk")
547 (uri (tegaki-release-uri "tegaki-pygtk" version))
550 "1cip0azxhjdj2dg2z85cp1z3lz4qwx3w1j7z4xmcm7npapmsaqs2"))
551 (modules remove-pre-compiled-files-modules)
552 (snippet (remove-pre-compiled-files "pyc"))))
554 (substitute-keyword-arguments (package-arguments python2-tegaki-wagomu)
556 `(modify-phases %standard-phases
557 (add-after 'unpack 'fix-paths
558 (lambda* (#:key inputs #:allow-other-keys)
559 (substitute* "tegakigtk/fakekey.py"
561 (string-append (assoc-ref inputs "libx11") "/lib/" so))
563 (string-append (assoc-ref inputs "libxtst") "/lib/" so)))
565 (inputs ; required for sending key strokes
567 ("libxtst" ,libxtst)))
568 (native-inputs '()) ; override inherited inputs
570 `(("python2-pygtk" ,python2-pygtk)
571 ("python2-tegaki-python" ,python2-tegaki-python)))
572 (synopsis "Chinese and Japanese Handwriting Recognition (Base UI library)")
573 (license gpl2+))) ; all files
575 (define-public python2-tegaki-tools
577 (inherit python2-tegaki-wagomu)
578 (name "python2-tegaki-tools")
583 (uri (tegaki-release-uri "tegaki-tools" version))
586 "0xxv97ggh2jgldw3r7y59lv3fhz733r6l7mdn6nh4m0gvb0ja971"))
587 (modules remove-pre-compiled-files-modules)
588 (snippet (remove-pre-compiled-files "pyc"))))
590 (substitute-keyword-arguments (package-arguments python2-tegaki-wagomu)
591 ((#:phases _) '%standard-phases)))
593 `(("python2-tegaki-pygtk" ,python2-tegaki-pygtk)))
594 ;; override inherited inputs
596 (propagated-inputs '())
597 (synopsis "Chinese and Japanese Handwriting Recognition (Advanced tools)")
598 ;; Files in gifenc/ are licensed under gpl3+ while other files are licensed
599 ;; under gpl2+. Therefore, the combined work is licensed under gpl3+.
602 (define-public python2-tegaki-recognize
603 (let ((commit "eceec69fe651d0733c8c8752dae569d2283d0f3c")
606 (inherit python2-tegaki-tools)
607 (name "python2-tegaki-recognize")
608 ;; version copied from <https://github.com/tegaki/tegaki/releases>
609 (version (git-version "0.3.1" revision commit))
612 ;; We use GIT-FETCH because 'tegaki-recognize.desktop.in' and
613 ;; 'tegaki-recognize.in' are missing in the tarball.
616 (url "https://github.com/tegaki/tegaki")
620 "09mw2if9p885phbgah5f95q3fwy7s5b46qlmpxqyzfcnj6g7afr5"))
621 (file-name (git-file-name name version))
622 (modules `((guix build utils)
625 ,@remove-pre-compiled-files-modules))
628 ;; remove unnecessary files with potentially different license
629 (for-each delete-file-recursively
631 (negate (cut member <> '("tegaki-recognize"
633 ,(remove-pre-compiled-files "pyc")
636 (substitute-keyword-arguments (package-arguments python2-tegaki-tools)
638 `(modify-phases %standard-phases
639 (add-after 'unpack 'chdir
641 (chdir "tegaki-recognize")
643 ;; 'setup.py' script does not support one of the Python build
644 ;; system's default flags, "--single-version-externally-managed"
646 (lambda* (#:key outputs #:allow-other-keys)
647 (invoke "python" "setup.py" "install"
648 (string-append "--prefix=" (assoc-ref outputs "out"))
651 (synopsis "Chinese and Japanese Handwriting Recognition (Main program)")
652 (license gpl2+)))) ; all files
654 (define-public tegaki-zinnia-japanese
656 (inherit python2-tegaki-wagomu)
657 (name "tegaki-zinnia-japanese")
662 (uri (tegaki-release-uri name version "zip"))
665 "1nmg9acxhcqly9gwkyb9m0hpy76fll91ywk4b1q4xms0ajxip1h7"))
666 (modules remove-pre-compiled-files-modules)
667 (snippet (remove-pre-compiled-files "model"))))
668 (build-system gnu-build-system)
670 `(#:tests? #f ; no tests
672 (modify-phases %standard-phases
674 (lambda* (#:key outputs #:allow-other-keys)
675 (substitute* "Makefile"
677 (assoc-ref outputs "out")))
679 ;; override inherited inputs
682 `(("python2-tegaki-tools" ,python2-tegaki-tools)))
683 (propagated-inputs '())
685 (list (search-path-specification
686 (variable "TEGAKI_MODEL_PATH")
687 (files '("share/tegaki/models")))))
688 (synopsis "Chinese and Japanese Handwriting Recognition (Model)")
689 (license lgpl2.1))) ; all files
691 (define-public tegaki-zinnia-japanese-light
693 (inherit tegaki-zinnia-japanese)
694 (name "tegaki-zinnia-japanese-light")
699 (uri (tegaki-release-uri name version "zip"))
702 "0x0fs29ylqzxd6xvg51h7rigpbisd7q8v11df425ib2j792yfyf8"))
703 (modules remove-pre-compiled-files-modules)
704 (snippet (remove-pre-compiled-files "model"))))
705 (license lgpl2.1))) ; all files
707 (define-public tegaki-zinnia-japanese-kyoiku
709 (inherit tegaki-zinnia-japanese)
710 (name "tegaki-zinnia-japanese-kyoiku")
715 (uri (tegaki-release-uri name version "zip"))
718 "0am94bcpmbzplxdnwn9gk15sgaizvcfhmv13mk14jjvx3419cvvx"))
719 (modules remove-pre-compiled-files-modules)
720 (snippet (remove-pre-compiled-files "model"))))
721 (license lgpl2.1))) ; all files
723 (define-public tegaki-zinnia-japanese-joyo
725 (inherit tegaki-zinnia-japanese)
726 (name "tegaki-zinnia-japanese-joyo")
731 (uri (tegaki-release-uri name version "zip"))
734 "1v0j40lzdyiz01ayws0b8r7fsdy2mr32658382kz4wyk883wzx2z"))
735 (modules remove-pre-compiled-files-modules)
736 (snippet (remove-pre-compiled-files "model"))))
737 (license lgpl2.1))) ; all files
739 (define-public tegaki-zinnia-simplified-chinese
741 (inherit tegaki-zinnia-japanese)
742 (name "tegaki-zinnia-simplified-chinese")
747 (uri (tegaki-release-uri name version "zip"))
750 "18wq0jccv7lpnrfnzspyc110d6pj2v1i21xcx4fmgzz1lnln3fs5"))
751 (modules remove-pre-compiled-files-modules)
752 (snippet (remove-pre-compiled-files "model"))))
753 (license lgpl2.1))) ; all files
755 (define-public tegaki-zinnia-simplified-chinese-light
757 (inherit tegaki-zinnia-japanese)
758 (name "tegaki-zinnia-simplified-chinese-light")
763 (uri (tegaki-release-uri name version "zip"))
766 "0v24yf0w0p03lb7fyx128a75mwzad166bigvlbrzqnad789qg1sr"))
767 (modules remove-pre-compiled-files-modules)
768 (snippet (remove-pre-compiled-files "model"))))
769 (license lgpl2.1))) ; all files
771 (define-public tegaki-zinnia-traditional-chinese
773 (inherit tegaki-zinnia-japanese)
774 (name "tegaki-zinnia-traditional-chinese")
779 (uri (tegaki-release-uri name version "zip"))
782 "140nlp6hynrai2svs5670jjfw1za6ayflhyj2dl0bzsfgbk3447l"))
783 (modules remove-pre-compiled-files-modules)
784 (snippet (remove-pre-compiled-files "model"))))
785 (license lgpl2.1))) ; all files
787 (define-public tegaki-zinnia-traditional-chinese-light
789 (inherit tegaki-zinnia-japanese)
790 (name "tegaki-zinnia-traditional-chinese-light")
795 (uri (tegaki-release-uri name version "zip"))
798 "1m6yk6a57vs9wg5y50qciwi1ahhmklp2mgsjysbj4mnyzv6yhcr2"))
799 (modules remove-pre-compiled-files-modules)
800 (snippet (remove-pre-compiled-files "model"))))
801 (license lgpl2.1))) ; all files
803 (define-public tegaki-wagomu-japanese
805 (inherit tegaki-zinnia-japanese)
806 (name "tegaki-wagomu-japanese")
811 (uri (tegaki-release-uri name version "zip"))
814 "0flj5id8xwsn7csrrzqz9prdikswnwm2wms0as2vzdpxzph1az4k"))
815 (modules remove-pre-compiled-files-modules)
816 (snippet (remove-pre-compiled-files "model"))))
817 (license lgpl2.1))) ; all files
819 (define-public tegaki-wagomu-japanese-kyoiku
821 (inherit tegaki-zinnia-japanese)
822 (name "tegaki-wagomu-japanese-kyoiku")
827 (uri (tegaki-release-uri name version "zip"))
830 "0v8crfh8rdf6ndp16g52s5jlrrlwh73xp38zjn5i9dlacx8kfqg1"))
831 (modules remove-pre-compiled-files-modules)
832 (snippet (remove-pre-compiled-files "model"))))
833 (license lgpl2.1))) ; all files
835 (define-public tegaki-wagomu-japanese-joyo
837 (inherit tegaki-zinnia-japanese)
838 (name "tegaki-wagomu-japanese-joyo")
843 (uri (tegaki-release-uri name version "zip"))
846 "0wk8shpr963zp328g991qs6abpnacq4242003m687z2d6yp7nph2"))
847 (modules remove-pre-compiled-files-modules)
848 (snippet (remove-pre-compiled-files "model"))))
849 (license lgpl2.1))) ; all files
851 (define-public tegaki-wagomu-simplified-chinese
853 (inherit tegaki-zinnia-japanese)
854 (name "tegaki-wagomu-simplified-chinese")
859 (uri (tegaki-release-uri name version "zip"))
862 "0wqprynigqxqxv128i1smh81gxvmjj056d9qpznxa3n9f5ymlbj6"))
863 (modules remove-pre-compiled-files-modules)
864 (snippet (remove-pre-compiled-files "model"))))
865 (license lgpl2.1))) ; all files
867 ;;; Upstream does not provide the source for tegaki-wagomu-traditional-chinese.
868 ;;; Therefore, we use the source for tegaki-zinnia-traditional-chinese and
869 ;;; patch the Makefile accordingly.
870 (define-public tegaki-wagomu-traditional-chinese
872 (inherit tegaki-zinnia-traditional-chinese)
873 (name "tegaki-wagomu-traditional-chinese")
875 (substitute-keyword-arguments
876 (package-arguments tegaki-zinnia-traditional-chinese)
877 ((#:phases phases '%standard-phases)
878 `(modify-phases ,phases
881 (let ((configure (assq-ref ,phases 'configure)))
882 (apply configure args))
883 (substitute* "Makefile"
884 (("zinnia") "wagomu"))
886 (license lgpl2.1))) ; all files
888 (define-public link-grammar
890 (name "link-grammar")
894 (uri (string-append "https://www.abisource.com/downloads/"
895 "link-grammar/" version
896 "/link-grammar-" version ".tar.gz"))
899 "0ak1v469k56v3511kxxkxvx1nw6zcxcl0f1kcvc82ffacqbr4y96"))))
900 (build-system gnu-build-system)
901 (home-page "https://www.abisource.com/projects/link-grammar/")
902 (synopsis "Link grammar parser")
903 (description "The Link Grammar Parser is a syntactic parser of English,
904 Russian, Arabic and Persian (and other languages as well), based on Link
905 Grammar, an original theory of syntax and morphology. Given a sentence, the
906 system assigns to it a syntactic structure, which consists of a set of
907 labelled links connecting pairs of words. The parser also produces a
908 \"constituent\" (HPSG style phrase tree) representation of a sentence (showing
909 noun phrases, verb phrases, etc.).")