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>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages language)
22 #:use-module (gnu packages)
23 #:use-module (gnu packages perl)
24 #:use-module (gnu packages perl-check)
25 #:use-module (gnu packages web)
26 #:use-module (guix packages)
27 #:use-module (guix build-system perl)
28 #:use-module ((guix licenses) #:select (gpl2 gpl3 perl-license))
29 #:use-module (guix download))
31 (define-public perl-lingua-en-findnumber
33 (name "perl-lingua-en-findnumber")
38 (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
39 "Lingua-EN-FindNumber-" version ".tar.gz"))
42 "015ximzdp42v824llwlg2pd77vd0d172lb4xs55q9f9zhqf6s5qx"))))
43 (build-system perl-build-system)
45 `(("perl-lingua-en-words2nums" ,perl-lingua-en-words2nums)))
46 (home-page "https://metacpan.org/release/Lingua-EN-FindNumber")
47 (synopsis "Locate (written) numbers in English text ")
48 (description "This module provides a regular expression for finding
49 numbers in English text. It also provides functions for extracting and
50 manipulating such numbers.")
51 (license perl-license)))
53 (define-public perl-lingua-en-inflect
55 (name "perl-lingua-en-inflect")
60 (uri (string-append "mirror://cpan/authors/id/D/DC/DCONWAY/"
61 "Lingua-EN-Inflect-" version ".tar.gz"))
64 "0j8d1f1wvmgc11d71pc8xp8fv5a1nb2yfw1dgd19xhscn1klpvzw"))))
65 (build-system perl-build-system)
66 (native-inputs `(("perl-module-build" ,perl-module-build)))
67 (home-page "https://metacpan.org/release/Lingua-EN-Inflect")
68 (synopsis "Convert singular to plural")
69 (description "Lingua::EN::Inflect provides plural inflections,
70 \"a\"/\"an\" selection for English words, and manipulation of numbers as
71 words. Plural forms of all nouns, most verbs, and some adjectives are
72 provided. Where appropriate, \"classical\" variants (for example: \"brother\"
73 -> \"brethren\", \"dogma\" -> \"dogmata\", etc.) are also provided.")
74 (license perl-license)))
76 (define-public perl-lingua-en-inflect-number
78 (name "perl-lingua-en-inflect-number")
83 (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
84 "Lingua-EN-Inflect-Number-" version ".tar.gz"))
87 "1gxccynkaqav43ww43jp4rzkyr36x97jd03yb5f6yx0jhn1k7yv6"))))
88 (build-system perl-build-system)
90 `(("perl-lingua-en-inflect" ,perl-lingua-en-inflect)))
91 (home-page "https://metacpan.org/release/Lingua-EN-Inflect-Number")
92 (synopsis "Force number of words to singular or plural")
93 (description "This module extends the functionality of Lingua::EN::Inflect
94 with three new functions for determining plurality of a word and forcefully
95 converting a word to singular or plural.")
96 (license perl-license)))
98 (define-public perl-lingua-en-inflect-phrase
100 (name "perl-lingua-en-inflect-phrase")
105 (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/"
106 "Lingua-EN-Inflect-Phrase-" version ".tar.gz"))
109 "1a6y1l2pjim2242wcpgz066di4pbzfgsjjdl7vg5a5wzm48qj1am"))))
110 (build-system perl-build-system)
112 `(("perl-test-nowarnings" ,perl-test-nowarnings)))
114 `(("perl-lingua-en-findnumber" ,perl-lingua-en-findnumber)
115 ("perl-lingua-en-inflect" ,perl-lingua-en-inflect)
116 ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
117 ("perl-lingua-en-number-isordinal" ,perl-lingua-en-number-isordinal)
118 ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)))
119 (home-page "https://metacpan.org/release/Lingua-EN-Inflect-Phrase")
120 (synopsis "Inflect short English phrases")
121 (description "This module attempts to pluralize or singularize short
123 (license perl-license)))
125 (define-public perl-lingua-en-number-isordinal
127 (name "perl-lingua-en-number-isordinal")
132 (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/"
133 "Lingua-EN-Number-IsOrdinal-" version ".tar.gz"))
136 "1mhqjvh2ad30gjab5b3a6mbr4aysyrscp4wp42yy5x6001a6km98"))))
137 (build-system perl-build-system)
139 `(("perl-try-tiny" ,perl-try-tiny)
140 ("perl-test-fatal" ,perl-test-fatal)))
142 `(("perl-lingua-en-findnumber" ,perl-lingua-en-findnumber)))
143 (home-page "https://metacpan.org/release/Lingua-EN-Number-IsOrdinal")
144 (synopsis "Detect if English number is ordinal or cardinal")
145 (description "This module will tell you if a number, either in words or as
146 digits, is a cardinal or ordinal number.")
147 (license perl-license)))
149 (define-public perl-lingua-en-tagger
151 (name "perl-lingua-en-tagger")
156 (uri (string-append "mirror://cpan/authors/id/A/AC/ACOBURN/"
157 "Lingua-EN-Tagger-" version ".tar.gz"))
160 "0nrnkvsf9f0a7lp82sanmy89ms2nqq1lvjqicvsagsvzp513bl5b"))))
161 (build-system perl-build-system)
163 `(("perl-memoize-expirelru" ,perl-memoize-expirelru)
164 ("perl-lingua-stem" ,perl-lingua-stem)
165 ("perl-html-parser" ,perl-html-parser)
166 ("perl-html-tagset" ,perl-html-tagset)))
167 (home-page "https://metacpan.org/release/Lingua-EN-Tagger")
168 (synopsis "Part-of-speech tagger for English natural language processing")
169 (description "This module is a probability based, corpus-trained tagger
170 that assigns part-of-speech tags to English text based on a lookup dictionary
171 and a set of probability values. The tagger assigns appropriate tags based on
172 conditional probabilities - it examines the preceding tag to determine the
173 appropriate tag for the current word. Unknown words are classified according
174 to word morphology or can be set to be treated as nouns or other parts of
175 speech. The tagger also extracts as many nouns and noun phrases as it can,
176 using a set of regular expressions.")
179 (define-public perl-lingua-en-words2nums
181 (name "perl-lingua-en-words2nums")
186 (uri (string-append "mirror://cpan/authors/id/J/JO/JOEY/"
187 "Lingua-EN-Words2Nums-" version ".tar.gz"))
190 "118xx8qr1zbx30psv7ic55w65h15mc1vz6zicshfm96jgiwmcrb8"))))
191 (build-system perl-build-system)
192 (home-page "https://metacpan.org/release/Lingua-EN-Words2Nums")
193 (synopsis "Convert English text to numbers")
194 (description "This module converts English text into numbers. It supports
195 both ordinal and cardinal numbers, negative numbers, and very large numbers.")
196 (license perl-license)))
198 (define-public perl-lingua-pt-stemmer
200 (name "perl-lingua-pt-stemmer")
205 (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
206 "Lingua-PT-Stemmer-" version ".tar.gz"))
209 "17c48sfbgwd2ivlgf59sr6jdhwa3aim8750f8pyzz7xpi8gz0var"))))
210 (build-system perl-build-system)
211 (home-page "https://metacpan.org/release/Lingua-PT-Stemmer")
212 (synopsis "Portuguese language stemming")
213 (description "This module implements a Portuguese stemming algorithm
214 proposed in the paper A Stemming Algorithm for the Portuguese Language by
215 Moreira, V. and Huyck, C.")
216 (license perl-license)))
218 (define-public perl-lingua-stem
220 (name "perl-lingua-stem")
225 (uri (string-append "mirror://cpan/authors/id/S/SN/SNOWHARE/"
226 "Lingua-Stem-" version ".tar.gz"))
229 "12avh2mnnc7llmmshrr5bgb473fvydxnlqrqbl2815mf2dp4pxcg"))))
230 (build-system perl-build-system)
232 `(("perl-module-build" ,perl-module-build)))
234 `(("perl-lingua-pt-stemmer" ,perl-lingua-pt-stemmer)
235 ("perl-lingua-stem-fr" ,perl-lingua-stem-fr)
236 ("perl-lingua-stem-it" ,perl-lingua-stem-it)
237 ("perl-lingua-stem-ru" ,perl-lingua-stem-ru)
238 ("perl-lingua-stem-snowball-da" ,perl-lingua-stem-snowball-da)
239 ("perl-snowball-norwegian" ,perl-snowball-norwegian)
240 ("perl-snowball-swedish" ,perl-snowball-swedish)
241 ("perl-text-german" ,perl-text-german)))
242 (home-page "https://metacpan.org/release/Lingua-Stem")
243 (synopsis "Stemming of words in various languages")
244 (description "This routine applies stemming algorithms to its parameters,
245 returning the stemmed words as appropriate to the selected locale.")
246 (license perl-license)))
248 (define-public perl-lingua-stem-fr
250 (name "perl-lingua-stem-fr")
255 (uri (string-append "mirror://cpan/authors/id/S/SD/SDP/"
256 "Lingua-Stem-Fr-" version ".tar.gz"))
259 "0vyrspwzaqjxm5mqshf4wvwa3938mkajd1918d9ii2l9m2rn8kwx"))))
260 (build-system perl-build-system)
261 (home-page "https://metacpan.org/release/Lingua-Stem-Fr")
262 (synopsis "Porter's stemming algorithm for French")
263 (description "This module uses a modified version of the Porter Stemming
264 Algorithm to return a stemmed French word.")
265 (license perl-license)))
267 (define-public perl-lingua-stem-it
269 (name "perl-lingua-stem-it")
274 (uri (string-append "mirror://cpan/authors/id/A/AC/ACALPINI/"
275 "Lingua-Stem-It-" version ".tar.gz"))
278 "1207r183s5hlh4mfwa6p46vzm0dhvrs2dnss5s41a0gyfkxp7riq"))))
279 (build-system perl-build-system)
280 (home-page "https://metacpan.org/release/Lingua-Stem-It")
281 (synopsis "Porter's stemming algorithm for Italian")
282 (description "This module applies the Porter Stemming Algorithm to its
283 parameters, returning the stemmed Italian word.")
284 (license perl-license)))
286 (define-public perl-lingua-stem-ru
288 (name "perl-lingua-stem-ru")
293 (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
294 "Lingua-Stem-Ru-" version ".tar.gz"))
297 "0a2jmdz7jn32qj5hyiw5kbv8fvlpmws8i00a6xcbkzb48yvwww0j"))))
298 (build-system perl-build-system)
299 (home-page "https://metacpan.org/release/Lingua-Stem-Ru")
300 (synopsis "Porter's stemming algorithm for Russian")
301 (description "This module applies the Porter Stemming Algorithm to its
302 parameters, returning the stemmed Russian (KOI8-R only) word.")
303 (license perl-license)))
305 (define-public perl-lingua-stem-snowball-da
307 (name "perl-lingua-stem-snowball-da")
312 (uri (string-append "mirror://cpan/authors/id/C/CI/CINE/"
313 "Lingua-Stem-Snowball-Da-" version ".tar.gz"))
316 "0mm0m7glm1s6i9f6a78jslw6wh573208arxhq93yriqmw17bwf9f"))))
317 (build-system perl-build-system)
318 (home-page "https://metacpan.org/release/Lingua-Stem-Snowball-Da")
319 (synopsis "Porters stemming algorithm for Danish")
320 (description "Lingua::Stem::Snowball::Da is a perl port of the danish
321 stemmer at http://snowball.sourceforge.net, it was originally altered from the
322 Lingua::Stem::Snowball::Se.")
325 (define-public perl-snowball-norwegian
327 (name "perl-snowball-norwegian")
332 (uri (string-append "mirror://cpan/authors/id/A/AS/ASKSH/"
333 "Snowball-Norwegian-" version ".tar.gz"))
336 "0675v45bbsh7vr7kpf36xs2q79g02iq1kmfw22h20xdk4rzqvkqx"))))
337 (build-system perl-build-system)
338 (native-inputs `(("perl-module-build" ,perl-module-build)))
339 (home-page "https://metacpan.org/release/Snowball-Norwegian")
340 (synopsis "Porters stemming algorithm for Norwegian")
341 (description "Lingua::Stem::Snowball::No is a perl port of the norwegian
342 stemmer at http://snowball.tartarus.org.")
343 (license perl-license)))
345 (define-public perl-snowball-swedish
347 (name "perl-snowball-swedish")
352 (uri (string-append "mirror://cpan/authors/id/A/AS/ASKSH/"
353 "Snowball-Swedish-" version ".tar.gz"))
356 "0agwc12jk5kmabnpsplw3wf4ii5w1zb159cpin44x3srb0sr5apg"))))
357 (build-system perl-build-system)
358 (native-inputs `(("perl-module-build" ,perl-module-build)))
359 (home-page "https://metacpan.org/release/Snowball-Swedish")
360 (synopsis "Porters stemming algorithm for Swedish")
361 (description "Lingua::Stem::Snowball::Se is a perl port of the swedish
362 stemmer at http://snowball.sourceforge.net.")
363 (license perl-license)))
365 (define-public perl-string-toidentifier-en
367 (name "perl-string-toidentifier-en")
372 (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/"
373 "String-ToIdentifier-EN-" version ".tar.gz"))
376 "12nw7h2yiybhdw0vnnpc7bif8ylhsn6kqf6s39dsrf9h54iq9yrs"))))
377 (build-system perl-build-system)
379 `(("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
380 ("perl-text-unidecode" ,perl-text-unidecode)
381 ("perl-namespace-clean" ,perl-namespace-clean)))
382 (home-page "https://metacpan.org/release/String-ToIdentifier-EN")
383 (synopsis "Convert strings to English program identifiers")
384 (description "This module provides a utility method, \"to_identifier\" for
385 converting an arbitrary string into a readable representation using the ASCII
386 subset of \"\\w\" for use as an identifier in a computer program. The intent
387 is to make unique identifier names from which the content of the original
388 string can be easily inferred by a human just by reading the identifier.")
389 (license perl-license)))
391 (define-public perl-text-german
393 (name "perl-text-german")
398 (uri (string-append "mirror://cpan/authors/id/U/UL/ULPFR/"
399 "Text-German-" version ".tar.gz"))
402 "1p87pgap99lw0nv62i3ghvsi7yg90lhn8vsa3yqp75rd04clybcj"))))
403 (build-system perl-build-system)
404 (home-page "https://metacpan.org/release/Text-German")
405 (synopsis "German grundform reduction")
406 (description "This module is a rather incomplete implementation of work
407 done by Gudrun Putze-Meier.")
408 (license perl-license)))