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 ng0 <ng0@n0.is>
5 ;;; Copyright © 2019 Alex Vong <alexvong1995@gmail.com>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages language)
23 #:use-module (gnu packages)
24 #:use-module (gnu packages glib)
25 #:use-module (gnu packages gtk)
26 #:use-module (gnu packages ocr)
27 #:use-module (gnu packages perl)
28 #:use-module (gnu packages pkg-config)
29 #:use-module (gnu packages python)
30 #:use-module (gnu packages perl-check)
31 #:use-module (gnu packages swig)
32 #:use-module (gnu packages web)
33 #:use-module (gnu packages xorg)
34 #:use-module (guix packages)
35 #:use-module (guix build-system gnu)
36 #:use-module (guix build-system perl)
37 #:use-module (guix build-system python)
38 #:use-module ((guix licenses)
40 (bsd-3 gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 perl-license zpl2.1))
41 #:use-module (guix download)
42 #:use-module (guix git-download)
43 #:use-module (guix utils))
45 (define-public perl-lingua-en-findnumber
47 (name "perl-lingua-en-findnumber")
52 (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
53 "Lingua-EN-FindNumber-" version ".tar.gz"))
56 "015ximzdp42v824llwlg2pd77vd0d172lb4xs55q9f9zhqf6s5qx"))))
57 (build-system perl-build-system)
59 `(("perl-lingua-en-words2nums" ,perl-lingua-en-words2nums)))
60 (home-page "https://metacpan.org/release/Lingua-EN-FindNumber")
61 (synopsis "Locate (written) numbers in English text ")
62 (description "This module provides a regular expression for finding
63 numbers in English text. It also provides functions for extracting and
64 manipulating such numbers.")
65 (license perl-license)))
67 (define-public perl-lingua-en-inflect
69 (name "perl-lingua-en-inflect")
74 (uri (string-append "mirror://cpan/authors/id/D/DC/DCONWAY/"
75 "Lingua-EN-Inflect-" version ".tar.gz"))
78 "0j8d1f1wvmgc11d71pc8xp8fv5a1nb2yfw1dgd19xhscn1klpvzw"))))
79 (build-system perl-build-system)
80 (native-inputs `(("perl-module-build" ,perl-module-build)))
81 (home-page "https://metacpan.org/release/Lingua-EN-Inflect")
82 (synopsis "Convert singular to plural")
83 (description "Lingua::EN::Inflect provides plural inflections,
84 \"a\"/\"an\" selection for English words, and manipulation of numbers as
85 words. Plural forms of all nouns, most verbs, and some adjectives are
86 provided. Where appropriate, \"classical\" variants (for example: \"brother\"
87 -> \"brethren\", \"dogma\" -> \"dogmata\", etc.) are also provided.")
88 (license perl-license)))
90 (define-public perl-lingua-en-inflect-number
92 (name "perl-lingua-en-inflect-number")
97 (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
98 "Lingua-EN-Inflect-Number-" version ".tar.gz"))
101 "1gxccynkaqav43ww43jp4rzkyr36x97jd03yb5f6yx0jhn1k7yv6"))))
102 (build-system perl-build-system)
104 `(("perl-lingua-en-inflect" ,perl-lingua-en-inflect)))
105 (home-page "https://metacpan.org/release/Lingua-EN-Inflect-Number")
106 (synopsis "Force number of words to singular or plural")
107 (description "This module extends the functionality of Lingua::EN::Inflect
108 with three new functions for determining plurality of a word and forcefully
109 converting a word to singular or plural.")
110 (license perl-license)))
112 (define-public perl-lingua-en-inflect-phrase
114 (name "perl-lingua-en-inflect-phrase")
119 (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/"
120 "Lingua-EN-Inflect-Phrase-" version ".tar.gz"))
123 "1a6y1l2pjim2242wcpgz066di4pbzfgsjjdl7vg5a5wzm48qj1am"))))
124 (build-system perl-build-system)
126 `(("perl-test-nowarnings" ,perl-test-nowarnings)))
128 `(("perl-lingua-en-findnumber" ,perl-lingua-en-findnumber)
129 ("perl-lingua-en-inflect" ,perl-lingua-en-inflect)
130 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
131 ("perl-lingua-en-number-isordinal" ,perl-lingua-en-number-isordinal)
132 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)))
133 (home-page "https://metacpan.org/release/Lingua-EN-Inflect-Phrase")
134 (synopsis "Inflect short English phrases")
135 (description "This module attempts to pluralize or singularize short
137 (license perl-license)))
139 (define-public perl-lingua-en-number-isordinal
141 (name "perl-lingua-en-number-isordinal")
146 (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/"
147 "Lingua-EN-Number-IsOrdinal-" version ".tar.gz"))
150 "1mhqjvh2ad30gjab5b3a6mbr4aysyrscp4wp42yy5x6001a6km98"))))
151 (build-system perl-build-system)
153 `(("perl-try-tiny" ,perl-try-tiny)
154 ("perl-test-fatal" ,perl-test-fatal)))
156 `(("perl-lingua-en-findnumber" ,perl-lingua-en-findnumber)))
157 (home-page "https://metacpan.org/release/Lingua-EN-Number-IsOrdinal")
158 (synopsis "Detect if English number is ordinal or cardinal")
159 (description "This module will tell you if a number, either in words or as
160 digits, is a cardinal or ordinal number.")
161 (license perl-license)))
163 (define-public perl-lingua-en-tagger
165 (name "perl-lingua-en-tagger")
170 (uri (string-append "mirror://cpan/authors/id/A/AC/ACOBURN/"
171 "Lingua-EN-Tagger-" version ".tar.gz"))
174 "0nrnkvsf9f0a7lp82sanmy89ms2nqq1lvjqicvsagsvzp513bl5b"))))
175 (build-system perl-build-system)
177 `(("perl-memoize-expirelru" ,perl-memoize-expirelru)
178 ("perl-lingua-stem" ,perl-lingua-stem)
179 ("perl-html-parser" ,perl-html-parser)
180 ("perl-html-tagset" ,perl-html-tagset)))
181 (home-page "https://metacpan.org/release/Lingua-EN-Tagger")
182 (synopsis "Part-of-speech tagger for English natural language processing")
183 (description "This module is a probability based, corpus-trained tagger
184 that assigns part-of-speech tags to English text based on a lookup dictionary
185 and a set of probability values. The tagger assigns appropriate tags based on
186 conditional probabilities - it examines the preceding tag to determine the
187 appropriate tag for the current word. Unknown words are classified according
188 to word morphology or can be set to be treated as nouns or other parts of
189 speech. The tagger also extracts as many nouns and noun phrases as it can,
190 using a set of regular expressions.")
193 (define-public perl-lingua-en-words2nums
195 (name "perl-lingua-en-words2nums")
200 (uri (string-append "mirror://cpan/authors/id/J/JO/JOEY/"
201 "Lingua-EN-Words2Nums-" version ".tar.gz"))
204 "118xx8qr1zbx30psv7ic55w65h15mc1vz6zicshfm96jgiwmcrb8"))))
205 (build-system perl-build-system)
206 (home-page "https://metacpan.org/release/Lingua-EN-Words2Nums")
207 (synopsis "Convert English text to numbers")
208 (description "This module converts English text into numbers. It supports
209 both ordinal and cardinal numbers, negative numbers, and very large numbers.")
210 (license perl-license)))
212 (define-public perl-lingua-pt-stemmer
214 (name "perl-lingua-pt-stemmer")
219 (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
220 "Lingua-PT-Stemmer-" version ".tar.gz"))
223 "17c48sfbgwd2ivlgf59sr6jdhwa3aim8750f8pyzz7xpi8gz0var"))))
224 (build-system perl-build-system)
225 (home-page "https://metacpan.org/release/Lingua-PT-Stemmer")
226 (synopsis "Portuguese language stemming")
227 (description "This module implements a Portuguese stemming algorithm
228 proposed in the paper A Stemming Algorithm for the Portuguese Language by
229 Moreira, V. and Huyck, C.")
230 (license perl-license)))
232 (define-public perl-lingua-stem
234 (name "perl-lingua-stem")
239 (uri (string-append "mirror://cpan/authors/id/S/SN/SNOWHARE/"
240 "Lingua-Stem-" version ".tar.gz"))
243 "12avh2mnnc7llmmshrr5bgb473fvydxnlqrqbl2815mf2dp4pxcg"))))
244 (build-system perl-build-system)
246 `(("perl-module-build" ,perl-module-build)))
248 `(("perl-lingua-pt-stemmer" ,perl-lingua-pt-stemmer)
249 ("perl-lingua-stem-fr" ,perl-lingua-stem-fr)
250 ("perl-lingua-stem-it" ,perl-lingua-stem-it)
251 ("perl-lingua-stem-ru" ,perl-lingua-stem-ru)
252 ("perl-lingua-stem-snowball-da" ,perl-lingua-stem-snowball-da)
253 ("perl-snowball-norwegian" ,perl-snowball-norwegian)
254 ("perl-snowball-swedish" ,perl-snowball-swedish)
255 ("perl-text-german" ,perl-text-german)))
256 (home-page "https://metacpan.org/release/Lingua-Stem")
257 (synopsis "Stemming of words in various languages")
258 (description "This routine applies stemming algorithms to its parameters,
259 returning the stemmed words as appropriate to the selected locale.")
260 (license perl-license)))
262 (define-public perl-lingua-stem-fr
264 (name "perl-lingua-stem-fr")
269 (uri (string-append "mirror://cpan/authors/id/S/SD/SDP/"
270 "Lingua-Stem-Fr-" version ".tar.gz"))
273 "0vyrspwzaqjxm5mqshf4wvwa3938mkajd1918d9ii2l9m2rn8kwx"))))
274 (build-system perl-build-system)
275 (home-page "https://metacpan.org/release/Lingua-Stem-Fr")
276 (synopsis "Porter's stemming algorithm for French")
277 (description "This module uses a modified version of the Porter Stemming
278 Algorithm to return a stemmed French word.")
279 (license perl-license)))
281 (define-public perl-lingua-stem-it
283 (name "perl-lingua-stem-it")
288 (uri (string-append "mirror://cpan/authors/id/A/AC/ACALPINI/"
289 "Lingua-Stem-It-" version ".tar.gz"))
292 "1207r183s5hlh4mfwa6p46vzm0dhvrs2dnss5s41a0gyfkxp7riq"))))
293 (build-system perl-build-system)
294 (home-page "https://metacpan.org/release/Lingua-Stem-It")
295 (synopsis "Porter's stemming algorithm for Italian")
296 (description "This module applies the Porter Stemming Algorithm to its
297 parameters, returning the stemmed Italian word.")
298 (license perl-license)))
300 (define-public perl-lingua-stem-ru
302 (name "perl-lingua-stem-ru")
307 (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
308 "Lingua-Stem-Ru-" version ".tar.gz"))
311 "0a2jmdz7jn32qj5hyiw5kbv8fvlpmws8i00a6xcbkzb48yvwww0j"))))
312 (build-system perl-build-system)
313 (home-page "https://metacpan.org/release/Lingua-Stem-Ru")
314 (synopsis "Porter's stemming algorithm for Russian")
315 (description "This module applies the Porter Stemming Algorithm to its
316 parameters, returning the stemmed Russian (KOI8-R only) word.")
317 (license perl-license)))
319 (define-public perl-lingua-stem-snowball-da
321 (name "perl-lingua-stem-snowball-da")
326 (uri (string-append "mirror://cpan/authors/id/C/CI/CINE/"
327 "Lingua-Stem-Snowball-Da-" version ".tar.gz"))
330 "0mm0m7glm1s6i9f6a78jslw6wh573208arxhq93yriqmw17bwf9f"))))
331 (build-system perl-build-system)
332 (home-page "https://metacpan.org/release/Lingua-Stem-Snowball-Da")
333 (synopsis "Porters stemming algorithm for Danish")
334 (description "Lingua::Stem::Snowball::Da is a perl port of the danish
335 stemmer at http://snowball.sourceforge.net, it was originally altered from the
336 Lingua::Stem::Snowball::Se.")
339 (define-public perl-snowball-norwegian
341 (name "perl-snowball-norwegian")
346 (uri (string-append "mirror://cpan/authors/id/A/AS/ASKSH/"
347 "Snowball-Norwegian-" version ".tar.gz"))
350 "0675v45bbsh7vr7kpf36xs2q79g02iq1kmfw22h20xdk4rzqvkqx"))))
351 (build-system perl-build-system)
352 (native-inputs `(("perl-module-build" ,perl-module-build)))
353 (home-page "https://metacpan.org/release/Snowball-Norwegian")
354 (synopsis "Porters stemming algorithm for Norwegian")
355 (description "Lingua::Stem::Snowball::No is a perl port of the norwegian
356 stemmer at http://snowball.tartarus.org.")
357 (license perl-license)))
359 (define-public perl-snowball-swedish
361 (name "perl-snowball-swedish")
366 (uri (string-append "mirror://cpan/authors/id/A/AS/ASKSH/"
367 "Snowball-Swedish-" version ".tar.gz"))
370 "0agwc12jk5kmabnpsplw3wf4ii5w1zb159cpin44x3srb0sr5apg"))))
371 (build-system perl-build-system)
372 (native-inputs `(("perl-module-build" ,perl-module-build)))
373 (home-page "https://metacpan.org/release/Snowball-Swedish")
374 (synopsis "Porters stemming algorithm for Swedish")
375 (description "Lingua::Stem::Snowball::Se is a perl port of the swedish
376 stemmer at http://snowball.sourceforge.net.")
377 (license perl-license)))
379 (define-public perl-string-toidentifier-en
381 (name "perl-string-toidentifier-en")
386 (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/"
387 "String-ToIdentifier-EN-" version ".tar.gz"))
390 "12nw7h2yiybhdw0vnnpc7bif8ylhsn6kqf6s39dsrf9h54iq9yrs"))))
391 (build-system perl-build-system)
393 `(("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
394 ("perl-text-unidecode" ,perl-text-unidecode)
395 ("perl-namespace-clean" ,perl-namespace-clean)))
396 (home-page "https://metacpan.org/release/String-ToIdentifier-EN")
397 (synopsis "Convert strings to English program identifiers")
398 (description "This module provides a utility method, \"to_identifier\" for
399 converting an arbitrary string into a readable representation using the ASCII
400 subset of \"\\w\" for use as an identifier in a computer program. The intent
401 is to make unique identifier names from which the content of the original
402 string can be easily inferred by a human just by reading the identifier.")
403 (license perl-license)))
405 (define-public perl-text-german
407 (name "perl-text-german")
412 (uri (string-append "mirror://cpan/authors/id/U/UL/ULPFR/"
413 "Text-German-" version ".tar.gz"))
416 "1p87pgap99lw0nv62i3ghvsi7yg90lhn8vsa3yqp75rd04clybcj"))))
417 (build-system perl-build-system)
418 (home-page "https://metacpan.org/release/Text-German")
419 (synopsis "German grundform reduction")
420 (description "This module is a rather incomplete implementation of work
421 done by Gudrun Putze-Meier.")
422 (license perl-license)))
424 (define* (tegaki-release-uri proj version
425 #:optional (ext "tar.gz"))
426 (string-append "https://github.com/tegaki/tegaki/releases/download"
427 "/v" version "/" proj "-" version "." ext))
429 (define remove-pre-compiled-files
431 "Return snippet for removing pre-compiled files matching one of the
433 `(begin (for-each delete-file
436 (any (cut string-suffix? <> name)
437 (map (cut string-append "." <>)
441 ;;; modules required for the above snippet
442 (define remove-pre-compiled-files-modules
447 (define-public python2-tegaki-wagomu
449 (name "python2-tegaki-wagomu")
454 (uri (tegaki-release-uri "tegaki-wagomu" version))
457 "1pzdiq4zy1nyylaj9i6v2h4h0r05klahskzpafpp367p4rysi1x9"))
458 (modules remove-pre-compiled-files-modules)
459 (snippet (remove-pre-compiled-files "pyc"))))
460 (build-system python-build-system)
462 `(#:python ,python-2 ; only Python 2 is supported
464 (modify-phases %standard-phases
465 (add-after 'unpack 'fix-recognizer
466 (lambda* (#:key inputs #:allow-other-keys)
467 ;; fix missing module and function
468 (substitute* "tegakiwagomu.py"
473 (("Results\\(candidates\\)")
479 `(("pkg-config" ,pkg-config)
481 (home-page "https://tegaki.github.io/")
483 "Chinese and Japanese Handwriting Recognition (Recognition engine)")
485 "Tegaki is an ongoing project which aims to develop a free and open-source
486 modern implementation of handwriting recognition software, specifically
487 designed for Chinese (simplified and traditional) and Japanese, and that is
488 suitable for both the desktop and mobile devices.")
489 (license gpl2+))) ; all files
491 (define-public python2-tegaki-python
493 (inherit python2-tegaki-wagomu)
494 (name "python2-tegaki-python")
499 (uri (tegaki-release-uri "tegaki-python" version))
502 "0x93k7pw9nh0ywd97pr8pm7jv3f94nw044i5k0zvzhdpsjqvak7p"))
503 (modules remove-pre-compiled-files-modules)
504 (snippet (remove-pre-compiled-files "pyc"))))
506 (substitute-keyword-arguments (package-arguments python2-tegaki-wagomu)
508 `(modify-phases %standard-phases
509 (add-after 'unpack 'pre-configure
510 (lambda* (#:key inputs #:allow-other-keys)
511 ;; Always convert string to unicode to avoid the following error
512 ;; when running "tegaki-build" in python2-tegaki-tools:
514 ;; sqlite3.ProgrammingError: You must not use 8-bit bytestrings
515 ;; unless you use a text_factory that can interpret 8-bit
516 ;; bytestrings (like text_factory = str).
517 ;; It is highly recommended that you instead just switch your
518 ;; application to Unicode strings.
519 (substitute* "tegaki/charcol.py"
520 (("sqlite3.OptimizedUnicode")
521 "lambda s: unicode(s, 'utf-8')"))
522 (substitute* "tegaki/engine.py"
524 (assoc-ref inputs "python2-tegaki-wagomu")))
526 ;; override inherited inputs
530 `(("python2-tegaki-wagomu" ,python2-tegaki-wagomu)
531 ("python2-zinnia" ,python2-zinnia)))
533 "Chinese and Japanese Handwriting Recognition (Base python library)")
534 (license (list gpl2+ ; all files except...
536 zpl2.1)))) ; minjson.py
538 (define-public python2-tegaki-pygtk
540 (inherit python2-tegaki-wagomu)
541 (name "python2-tegaki-pygtk")
546 (uri (tegaki-release-uri "tegaki-pygtk" version))
549 "1cip0azxhjdj2dg2z85cp1z3lz4qwx3w1j7z4xmcm7npapmsaqs2"))
550 (modules remove-pre-compiled-files-modules)
551 (snippet (remove-pre-compiled-files "pyc"))))
553 (substitute-keyword-arguments (package-arguments python2-tegaki-wagomu)
555 `(modify-phases %standard-phases
556 (add-after 'unpack 'fix-paths
557 (lambda* (#:key inputs #:allow-other-keys)
558 (substitute* "tegakigtk/fakekey.py"
560 (string-append (assoc-ref inputs "libx11") "/lib/" so))
562 (string-append (assoc-ref inputs "libxtst") "/lib/" so)))
564 (inputs ; required for sending key strokes
566 ("libxtst" ,libxtst)))
567 (native-inputs '()) ; override inherited inputs
569 `(("python2-pygtk" ,python2-pygtk)
570 ("python2-tegaki-python" ,python2-tegaki-python)))
571 (synopsis "Chinese and Japanese Handwriting Recognition (Base UI library)")
572 (license gpl2+))) ; all files
574 (define-public python2-tegaki-tools
576 (inherit python2-tegaki-wagomu)
577 (name "python2-tegaki-tools")
582 (uri (tegaki-release-uri "tegaki-tools" version))
585 "0xxv97ggh2jgldw3r7y59lv3fhz733r6l7mdn6nh4m0gvb0ja971"))
586 (modules remove-pre-compiled-files-modules)
587 (snippet (remove-pre-compiled-files "pyc"))))
589 (substitute-keyword-arguments (package-arguments python2-tegaki-wagomu)
590 ((#:phases _) '%standard-phases)))
592 `(("python2-tegaki-pygtk" ,python2-tegaki-pygtk)))
593 ;; override inherited inputs
595 (propagated-inputs '())
596 (synopsis "Chinese and Japanese Handwriting Recognition (Advanced tools)")
597 ;; Files in gifenc/ are licensed under gpl3+ while other files are licensed
598 ;; under gpl2+. Therefore, the combined work is licensed under gpl3+.
601 (define-public python2-tegaki-recognize
602 (let ((commit "eceec69fe651d0733c8c8752dae569d2283d0f3c")
605 (inherit python2-tegaki-tools)
606 (name "python2-tegaki-recognize")
607 ;; version copied from <https://github.com/tegaki/tegaki/releases>
608 (version (git-version "0.3.1" revision commit))
611 ;; We use GIT-FETCH because 'tegaki-recognize.desktop.in' and
612 ;; 'tegaki-recognize.in' are missing in the tarball.
615 (url "https://github.com/tegaki/tegaki.git")
619 "09mw2if9p885phbgah5f95q3fwy7s5b46qlmpxqyzfcnj6g7afr5"))
620 (file-name (git-file-name name version))
621 (modules `((guix build utils)
624 ,@remove-pre-compiled-files-modules))
627 ;; remove unnecessary files with potentially different license
628 (for-each delete-file-recursively
630 (negate (cut member <> '("tegaki-recognize"
632 ,(remove-pre-compiled-files "pyc")
635 (substitute-keyword-arguments (package-arguments python2-tegaki-tools)
637 `(modify-phases %standard-phases
638 (add-after 'unpack 'chdir
640 (chdir "tegaki-recognize")
642 ;; 'setup.py' script does not support one of the Python build
643 ;; system's default flags, "--single-version-externally-managed"
645 (lambda* (#:key outputs #:allow-other-keys)
646 (invoke "python" "setup.py" "install"
647 (string-append "--prefix=" (assoc-ref outputs "out"))
650 (synopsis "Chinese and Japanese Handwriting Recognition (Main program)")
651 (license gpl2+)))) ; all files
653 (define-public tegaki-zinnia-japanese
655 (inherit python2-tegaki-wagomu)
656 (name "tegaki-zinnia-japanese")
661 (uri (tegaki-release-uri name version "zip"))
664 "1nmg9acxhcqly9gwkyb9m0hpy76fll91ywk4b1q4xms0ajxip1h7"))
665 (modules remove-pre-compiled-files-modules)
666 (snippet (remove-pre-compiled-files "model"))))
667 (build-system gnu-build-system)
669 `(#:tests? #f ; no tests
671 (modify-phases %standard-phases
673 (lambda* (#:key outputs #:allow-other-keys)
674 (substitute* "Makefile"
676 (assoc-ref outputs "out")))
678 ;; override inherited inputs
681 `(("python2-tegaki-tools" ,python2-tegaki-tools)))
682 (propagated-inputs '())
684 (list (search-path-specification
685 (variable "TEGAKI_MODEL_PATH")
686 (files '("share/tegaki/models")))))
687 (synopsis "Chinese and Japanese Handwriting Recognition (Model)")
688 (license lgpl2.1))) ; all files
690 (define-public tegaki-zinnia-japanese-light
692 (inherit tegaki-zinnia-japanese)
693 (name "tegaki-zinnia-japanese-light")
698 (uri (tegaki-release-uri name version "zip"))
701 "0x0fs29ylqzxd6xvg51h7rigpbisd7q8v11df425ib2j792yfyf8"))
702 (modules remove-pre-compiled-files-modules)
703 (snippet (remove-pre-compiled-files "model"))))
704 (license lgpl2.1))) ; all files
706 (define-public tegaki-zinnia-japanese-kyoiku
708 (inherit tegaki-zinnia-japanese)
709 (name "tegaki-zinnia-japanese-kyoiku")
714 (uri (tegaki-release-uri name version "zip"))
717 "0am94bcpmbzplxdnwn9gk15sgaizvcfhmv13mk14jjvx3419cvvx"))
718 (modules remove-pre-compiled-files-modules)
719 (snippet (remove-pre-compiled-files "model"))))
720 (license lgpl2.1))) ; all files
722 (define-public tegaki-zinnia-japanese-joyo
724 (inherit tegaki-zinnia-japanese)
725 (name "tegaki-zinnia-japanese-joyo")
730 (uri (tegaki-release-uri name version "zip"))
733 "1v0j40lzdyiz01ayws0b8r7fsdy2mr32658382kz4wyk883wzx2z"))
734 (modules remove-pre-compiled-files-modules)
735 (snippet (remove-pre-compiled-files "model"))))
736 (license lgpl2.1))) ; all files
738 (define-public tegaki-zinnia-simplified-chinese
740 (inherit tegaki-zinnia-japanese)
741 (name "tegaki-zinnia-simplified-chinese")
746 (uri (tegaki-release-uri name version "zip"))
749 "18wq0jccv7lpnrfnzspyc110d6pj2v1i21xcx4fmgzz1lnln3fs5"))
750 (modules remove-pre-compiled-files-modules)
751 (snippet (remove-pre-compiled-files "model"))))
752 (license lgpl2.1))) ; all files
754 (define-public tegaki-zinnia-simplified-chinese-light
756 (inherit tegaki-zinnia-japanese)
757 (name "tegaki-zinnia-simplified-chinese-light")
762 (uri (tegaki-release-uri name version "zip"))
765 "0v24yf0w0p03lb7fyx128a75mwzad166bigvlbrzqnad789qg1sr"))
766 (modules remove-pre-compiled-files-modules)
767 (snippet (remove-pre-compiled-files "model"))))
768 (license lgpl2.1))) ; all files
770 (define-public tegaki-zinnia-traditional-chinese
772 (inherit tegaki-zinnia-japanese)
773 (name "tegaki-zinnia-traditional-chinese")
778 (uri (tegaki-release-uri name version "zip"))
781 "140nlp6hynrai2svs5670jjfw1za6ayflhyj2dl0bzsfgbk3447l"))
782 (modules remove-pre-compiled-files-modules)
783 (snippet (remove-pre-compiled-files "model"))))
784 (license lgpl2.1))) ; all files
786 (define-public tegaki-zinnia-traditional-chinese-light
788 (inherit tegaki-zinnia-japanese)
789 (name "tegaki-zinnia-traditional-chinese-light")
794 (uri (tegaki-release-uri name version "zip"))
797 "1m6yk6a57vs9wg5y50qciwi1ahhmklp2mgsjysbj4mnyzv6yhcr2"))
798 (modules remove-pre-compiled-files-modules)
799 (snippet (remove-pre-compiled-files "model"))))
800 (license lgpl2.1))) ; all files
802 (define-public tegaki-wagomu-japanese
804 (inherit tegaki-zinnia-japanese)
805 (name "tegaki-wagomu-japanese")
810 (uri (tegaki-release-uri name version "zip"))
813 "0flj5id8xwsn7csrrzqz9prdikswnwm2wms0as2vzdpxzph1az4k"))
814 (modules remove-pre-compiled-files-modules)
815 (snippet (remove-pre-compiled-files "model"))))
816 (license lgpl2.1))) ; all files
818 (define-public tegaki-wagomu-japanese-kyoiku
820 (inherit tegaki-zinnia-japanese)
821 (name "tegaki-wagomu-japanese-kyoiku")
826 (uri (tegaki-release-uri name version "zip"))
829 "0v8crfh8rdf6ndp16g52s5jlrrlwh73xp38zjn5i9dlacx8kfqg1"))
830 (modules remove-pre-compiled-files-modules)
831 (snippet (remove-pre-compiled-files "model"))))
832 (license lgpl2.1))) ; all files
834 (define-public tegaki-wagomu-japanese-joyo
836 (inherit tegaki-zinnia-japanese)
837 (name "tegaki-wagomu-japanese-joyo")
842 (uri (tegaki-release-uri name version "zip"))
845 "0wk8shpr963zp328g991qs6abpnacq4242003m687z2d6yp7nph2"))
846 (modules remove-pre-compiled-files-modules)
847 (snippet (remove-pre-compiled-files "model"))))
848 (license lgpl2.1))) ; all files
850 (define-public tegaki-wagomu-simplified-chinese
852 (inherit tegaki-zinnia-japanese)
853 (name "tegaki-wagomu-simplified-chinese")
858 (uri (tegaki-release-uri name version "zip"))
861 "0wqprynigqxqxv128i1smh81gxvmjj056d9qpznxa3n9f5ymlbj6"))
862 (modules remove-pre-compiled-files-modules)
863 (snippet (remove-pre-compiled-files "model"))))
864 (license lgpl2.1))) ; all files
866 ;;; Upstream does not provide the source for tegaki-wagomu-traditional-chinese.
867 ;;; Therefore, we use the source for tegaki-zinnia-traditional-chinese and
868 ;;; patch the Makefile accordingly.
869 (define-public tegaki-wagomu-traditional-chinese
871 (inherit tegaki-zinnia-traditional-chinese)
872 (name "tegaki-wagomu-traditional-chinese")
874 (substitute-keyword-arguments
875 (package-arguments tegaki-zinnia-traditional-chinese)
876 ((#:phases phases '%standard-phases)
877 `(modify-phases ,phases
880 (let ((configure (assq-ref ,phases 'configure)))
881 (apply configure args))
882 (substitute* "Makefile"
883 (("zinnia") "wagomu"))
885 (license lgpl2.1))) ; all files