language.scm 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  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 Nils Gillmann <ng0@n0.is>
  5. ;;;
  6. ;;; This file is part of GNU Guix.
  7. ;;;
  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.
  12. ;;;
  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.
  17. ;;;
  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/>.
  20. (define-module (gnu packages language)
  21. #:use-module (gnu packages)
  22. #:use-module (gnu packages perl)
  23. #:use-module (gnu packages perl-check)
  24. #:use-module (gnu packages web)
  25. #:use-module (guix packages)
  26. #:use-module (guix build-system perl)
  27. #:use-module ((guix licenses) #:select (gpl2 gpl3 perl-license))
  28. #:use-module (guix download))
  29. (define-public perl-lingua-en-findnumber
  30. (package
  31. (name "perl-lingua-en-findnumber")
  32. (version "1.32")
  33. (source
  34. (origin
  35. (method url-fetch)
  36. (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
  37. "Lingua-EN-FindNumber-" version ".tar.gz"))
  38. (sha256
  39. (base32
  40. "015ximzdp42v824llwlg2pd77vd0d172lb4xs55q9f9zhqf6s5qx"))))
  41. (build-system perl-build-system)
  42. (propagated-inputs
  43. `(("perl-lingua-en-words2nums" ,perl-lingua-en-words2nums)))
  44. (home-page "https://metacpan.org/release/Lingua-EN-FindNumber")
  45. (synopsis "Locate (written) numbers in English text ")
  46. (description "This module provides a regular expression for finding
  47. numbers in English text. It also provides functions for extracting and
  48. manipulating such numbers.")
  49. (license perl-license)))
  50. (define-public perl-lingua-en-inflect
  51. (package
  52. (name "perl-lingua-en-inflect")
  53. (version "1.903")
  54. (source
  55. (origin
  56. (method url-fetch)
  57. (uri (string-append "mirror://cpan/authors/id/D/DC/DCONWAY/"
  58. "Lingua-EN-Inflect-" version ".tar.gz"))
  59. (sha256
  60. (base32
  61. "0j8d1f1wvmgc11d71pc8xp8fv5a1nb2yfw1dgd19xhscn1klpvzw"))))
  62. (build-system perl-build-system)
  63. (native-inputs `(("perl-module-build" ,perl-module-build)))
  64. (home-page "https://metacpan.org/release/Lingua-EN-Inflect")
  65. (synopsis "Convert singular to plural")
  66. (description "Lingua::EN::Inflect provides plural inflections,
  67. \"a\"/\"an\" selection for English words, and manipulation of numbers as
  68. words. Plural forms of all nouns, most verbs, and some adjectives are
  69. provided. Where appropriate, \"classical\" variants (for example: \"brother\"
  70. -> \"brethren\", \"dogma\" -> \"dogmata\", etc.) are also provided.")
  71. (license perl-license)))
  72. (define-public perl-lingua-en-inflect-number
  73. (package
  74. (name "perl-lingua-en-inflect-number")
  75. (version "1.12")
  76. (source
  77. (origin
  78. (method url-fetch)
  79. (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
  80. "Lingua-EN-Inflect-Number-" version ".tar.gz"))
  81. (sha256
  82. (base32
  83. "1gxccynkaqav43ww43jp4rzkyr36x97jd03yb5f6yx0jhn1k7yv6"))))
  84. (build-system perl-build-system)
  85. (propagated-inputs
  86. `(("perl-lingua-en-inflect" ,perl-lingua-en-inflect)))
  87. (home-page "https://metacpan.org/release/Lingua-EN-Inflect-Number")
  88. (synopsis "Force number of words to singular or plural")
  89. (description "This module extends the functionality of Lingua::EN::Inflect
  90. with three new functions for determining plurality of a word and forcefully
  91. converting a word to singular or plural.")
  92. (license perl-license)))
  93. (define-public perl-lingua-en-inflect-phrase
  94. (package
  95. (name "perl-lingua-en-inflect-phrase")
  96. (version "0.20")
  97. (source
  98. (origin
  99. (method url-fetch)
  100. (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/"
  101. "Lingua-EN-Inflect-Phrase-" version ".tar.gz"))
  102. (sha256
  103. (base32
  104. "1a6y1l2pjim2242wcpgz066di4pbzfgsjjdl7vg5a5wzm48qj1am"))))
  105. (build-system perl-build-system)
  106. (native-inputs
  107. `(("perl-test-nowarnings" ,perl-test-nowarnings)))
  108. (propagated-inputs
  109. `(("perl-lingua-en-findnumber" ,perl-lingua-en-findnumber)
  110. ("perl-lingua-en-inflect" ,perl-lingua-en-inflect)
  111. ("perl-lingua-en-inflect-number" ,perl-lingua-en-inflect-number)
  112. ("perl-lingua-en-number-isordinal" ,perl-lingua-en-number-isordinal)
  113. ("perl-lingua-en-tagger" ,perl-lingua-en-tagger)))
  114. (home-page "https://metacpan.org/release/Lingua-EN-Inflect-Phrase")
  115. (synopsis "Inflect short English phrases")
  116. (description "This module attempts to pluralize or singularize short
  117. English phrases.")
  118. (license perl-license)))
  119. (define-public perl-lingua-en-number-isordinal
  120. (package
  121. (name "perl-lingua-en-number-isordinal")
  122. (version "0.05")
  123. (source
  124. (origin
  125. (method url-fetch)
  126. (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/"
  127. "Lingua-EN-Number-IsOrdinal-" version ".tar.gz"))
  128. (sha256
  129. (base32
  130. "1mhqjvh2ad30gjab5b3a6mbr4aysyrscp4wp42yy5x6001a6km98"))))
  131. (build-system perl-build-system)
  132. (native-inputs
  133. `(("perl-try-tiny" ,perl-try-tiny)
  134. ("perl-test-fatal" ,perl-test-fatal)))
  135. (propagated-inputs
  136. `(("perl-lingua-en-findnumber" ,perl-lingua-en-findnumber)))
  137. (home-page "https://metacpan.org/release/Lingua-EN-Number-IsOrdinal")
  138. (synopsis "Detect if English number is ordinal or cardinal")
  139. (description "This module will tell you if a number, either in words or as
  140. digits, is a cardinal or ordinal number.")
  141. (license perl-license)))
  142. (define-public perl-lingua-en-tagger
  143. (package
  144. (name "perl-lingua-en-tagger")
  145. (version "0.29")
  146. (source
  147. (origin
  148. (method url-fetch)
  149. (uri (string-append "mirror://cpan/authors/id/A/AC/ACOBURN/"
  150. "Lingua-EN-Tagger-" version ".tar.gz"))
  151. (sha256
  152. (base32
  153. "0dssn101kmpkh2ik1430mj2ikk04849vbpgi60382kvh9xn795na"))))
  154. (build-system perl-build-system)
  155. (propagated-inputs
  156. `(("perl-memoize-expirelru" ,perl-memoize-expirelru)
  157. ("perl-lingua-stem" ,perl-lingua-stem)
  158. ("perl-html-parser" ,perl-html-parser)
  159. ("perl-html-tagset" ,perl-html-tagset)))
  160. (home-page "https://metacpan.org/release/Lingua-EN-Tagger")
  161. (synopsis "Part-of-speech tagger for English natural language processing")
  162. (description "This module is a probability based, corpus-trained tagger
  163. that assigns part-of-speech tags to English text based on a lookup dictionary
  164. and a set of probability values. The tagger assigns appropriate tags based on
  165. conditional probabilities - it examines the preceding tag to determine the
  166. appropriate tag for the current word. Unknown words are classified according
  167. to word morphology or can be set to be treated as nouns or other parts of
  168. speech. The tagger also extracts as many nouns and noun phrases as it can,
  169. using a set of regular expressions.")
  170. (license gpl3)))
  171. (define-public perl-lingua-en-words2nums
  172. (package
  173. (name "perl-lingua-en-words2nums")
  174. (version "0.18")
  175. (source
  176. (origin
  177. (method url-fetch)
  178. (uri (string-append "mirror://cpan/authors/id/J/JO/JOEY/"
  179. "Lingua-EN-Words2Nums-" version ".tar.gz"))
  180. (sha256
  181. (base32
  182. "118xx8qr1zbx30psv7ic55w65h15mc1vz6zicshfm96jgiwmcrb8"))))
  183. (build-system perl-build-system)
  184. (home-page "https://metacpan.org/release/Lingua-EN-Words2Nums")
  185. (synopsis "Convert English text to numbers")
  186. (description "This module converts English text into numbers. It supports
  187. both ordinal and cardinal numbers, negative numbers, and very large numbers.")
  188. (license perl-license)))
  189. (define-public perl-lingua-pt-stemmer
  190. (package
  191. (name "perl-lingua-pt-stemmer")
  192. (version "0.02")
  193. (source
  194. (origin
  195. (method url-fetch)
  196. (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
  197. "Lingua-PT-Stemmer-" version ".tar.gz"))
  198. (sha256
  199. (base32
  200. "17c48sfbgwd2ivlgf59sr6jdhwa3aim8750f8pyzz7xpi8gz0var"))))
  201. (build-system perl-build-system)
  202. (home-page "https://metacpan.org/release/Lingua-PT-Stemmer")
  203. (synopsis "Portuguese language stemming")
  204. (description "This module implements a Portuguese stemming algorithm
  205. proposed in the paper A Stemming Algorithm for the Portuguese Language by
  206. Moreira, V. and Huyck, C.")
  207. (license perl-license)))
  208. (define-public perl-lingua-stem
  209. (package
  210. (name "perl-lingua-stem")
  211. (version "0.84")
  212. (source
  213. (origin
  214. (method url-fetch)
  215. (uri (string-append "mirror://cpan/authors/id/S/SN/SNOWHARE/"
  216. "Lingua-Stem-" version ".tar.gz"))
  217. (sha256
  218. (base32
  219. "12avh2mnnc7llmmshrr5bgb473fvydxnlqrqbl2815mf2dp4pxcg"))))
  220. (build-system perl-build-system)
  221. (native-inputs
  222. `(("perl-module-build" ,perl-module-build)))
  223. (propagated-inputs
  224. `(("perl-lingua-pt-stemmer" ,perl-lingua-pt-stemmer)
  225. ("perl-lingua-stem-fr" ,perl-lingua-stem-fr)
  226. ("perl-lingua-stem-it" ,perl-lingua-stem-it)
  227. ("perl-lingua-stem-ru" ,perl-lingua-stem-ru)
  228. ("perl-lingua-stem-snowball-da" ,perl-lingua-stem-snowball-da)
  229. ("perl-snowball-norwegian" ,perl-snowball-norwegian)
  230. ("perl-snowball-swedish" ,perl-snowball-swedish)
  231. ("perl-text-german" ,perl-text-german)))
  232. (home-page "https://metacpan.org/release/Lingua-Stem")
  233. (synopsis "Stemming of words in various languages")
  234. (description "This routine applies stemming algorithms to its parameters,
  235. returning the stemmed words as appropriate to the selected locale.")
  236. (license perl-license)))
  237. (define-public perl-lingua-stem-fr
  238. (package
  239. (name "perl-lingua-stem-fr")
  240. (version "0.02")
  241. (source
  242. (origin
  243. (method url-fetch)
  244. (uri (string-append "mirror://cpan/authors/id/S/SD/SDP/"
  245. "Lingua-Stem-Fr-" version ".tar.gz"))
  246. (sha256
  247. (base32
  248. "0vyrspwzaqjxm5mqshf4wvwa3938mkajd1918d9ii2l9m2rn8kwx"))))
  249. (build-system perl-build-system)
  250. (home-page "https://metacpan.org/release/Lingua-Stem-Fr")
  251. (synopsis "Porter's stemming algorithm for French")
  252. (description "This module uses a modified version of the Porter Stemming
  253. Algorithm to return a stemmed French word.")
  254. (license perl-license)))
  255. (define-public perl-lingua-stem-it
  256. (package
  257. (name "perl-lingua-stem-it")
  258. (version "0.02")
  259. (source
  260. (origin
  261. (method url-fetch)
  262. (uri (string-append "mirror://cpan/authors/id/A/AC/ACALPINI/"
  263. "Lingua-Stem-It-" version ".tar.gz"))
  264. (sha256
  265. (base32
  266. "1207r183s5hlh4mfwa6p46vzm0dhvrs2dnss5s41a0gyfkxp7riq"))))
  267. (build-system perl-build-system)
  268. (home-page "https://metacpan.org/release/Lingua-Stem-It")
  269. (synopsis "Porter's stemming algorithm for Italian")
  270. (description "This module applies the Porter Stemming Algorithm to its
  271. parameters, returning the stemmed Italian word.")
  272. (license perl-license)))
  273. (define-public perl-lingua-stem-ru
  274. (package
  275. (name "perl-lingua-stem-ru")
  276. (version "0.04")
  277. (source
  278. (origin
  279. (method url-fetch)
  280. (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
  281. "Lingua-Stem-Ru-" version ".tar.gz"))
  282. (sha256
  283. (base32
  284. "0a2jmdz7jn32qj5hyiw5kbv8fvlpmws8i00a6xcbkzb48yvwww0j"))))
  285. (build-system perl-build-system)
  286. (home-page "https://metacpan.org/release/Lingua-Stem-Ru")
  287. (synopsis "Porter's stemming algorithm for Russian")
  288. (description "This module applies the Porter Stemming Algorithm to its
  289. parameters, returning the stemmed Russian (KOI8-R only) word.")
  290. (license perl-license)))
  291. (define-public perl-lingua-stem-snowball-da
  292. (package
  293. (name "perl-lingua-stem-snowball-da")
  294. (version "1.01")
  295. (source
  296. (origin
  297. (method url-fetch)
  298. (uri (string-append "mirror://cpan/authors/id/C/CI/CINE/"
  299. "Lingua-Stem-Snowball-Da-" version ".tar.gz"))
  300. (sha256
  301. (base32
  302. "0mm0m7glm1s6i9f6a78jslw6wh573208arxhq93yriqmw17bwf9f"))))
  303. (build-system perl-build-system)
  304. (home-page "https://metacpan.org/release/Lingua-Stem-Snowball-Da")
  305. (synopsis "Porters stemming algorithm for Danish")
  306. (description "Lingua::Stem::Snowball::Da is a perl port of the danish
  307. stemmer at http://snowball.sourceforge.net, it was originally altered from the
  308. Lingua::Stem::Snowball::Se.")
  309. (license gpl2)))
  310. (define-public perl-snowball-norwegian
  311. (package
  312. (name "perl-snowball-norwegian")
  313. (version "1.2")
  314. (source
  315. (origin
  316. (method url-fetch)
  317. (uri (string-append "mirror://cpan/authors/id/A/AS/ASKSH/"
  318. "Snowball-Norwegian-" version ".tar.gz"))
  319. (sha256
  320. (base32
  321. "0675v45bbsh7vr7kpf36xs2q79g02iq1kmfw22h20xdk4rzqvkqx"))))
  322. (build-system perl-build-system)
  323. (native-inputs `(("perl-module-build" ,perl-module-build)))
  324. (home-page "https://metacpan.org/release/Snowball-Norwegian")
  325. (synopsis "Porters stemming algorithm for Norwegian")
  326. (description "Lingua::Stem::Snowball::No is a perl port of the norwegian
  327. stemmer at http://snowball.tartarus.org.")
  328. (license perl-license)))
  329. (define-public perl-snowball-swedish
  330. (package
  331. (name "perl-snowball-swedish")
  332. (version "1.2")
  333. (source
  334. (origin
  335. (method url-fetch)
  336. (uri (string-append "mirror://cpan/authors/id/A/AS/ASKSH/"
  337. "Snowball-Swedish-" version ".tar.gz"))
  338. (sha256
  339. (base32
  340. "0agwc12jk5kmabnpsplw3wf4ii5w1zb159cpin44x3srb0sr5apg"))))
  341. (build-system perl-build-system)
  342. (native-inputs `(("perl-module-build" ,perl-module-build)))
  343. (home-page "https://metacpan.org/release/Snowball-Swedish")
  344. (synopsis "Porters stemming algorithm for Swedish")
  345. (description "Lingua::Stem::Snowball::Se is a perl port of the swedish
  346. stemmer at http://snowball.sourceforge.net.")
  347. (license perl-license)))
  348. (define-public perl-string-toidentifier-en
  349. (package
  350. (name "perl-string-toidentifier-en")
  351. (version "0.12")
  352. (source
  353. (origin
  354. (method url-fetch)
  355. (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/"
  356. "String-ToIdentifier-EN-" version ".tar.gz"))
  357. (sha256
  358. (base32
  359. "12nw7h2yiybhdw0vnnpc7bif8ylhsn6kqf6s39dsrf9h54iq9yrs"))))
  360. (build-system perl-build-system)
  361. (propagated-inputs
  362. `(("perl-lingua-en-inflect-phrase" ,perl-lingua-en-inflect-phrase)
  363. ("perl-text-unidecode" ,perl-text-unidecode)
  364. ("perl-namespace-clean" ,perl-namespace-clean)))
  365. (home-page "https://metacpan.org/release/String-ToIdentifier-EN")
  366. (synopsis "Convert strings to English program identifiers")
  367. (description "This module provides a utility method, \"to_identifier\" for
  368. converting an arbitrary string into a readable representation using the ASCII
  369. subset of \"\\w\" for use as an identifier in a computer program. The intent
  370. is to make unique identifier names from which the content of the original
  371. string can be easily inferred by a human just by reading the identifier.")
  372. (license perl-license)))
  373. (define-public perl-text-german
  374. (package
  375. (name "perl-text-german")
  376. (version "0.06")
  377. (source
  378. (origin
  379. (method url-fetch)
  380. (uri (string-append "mirror://cpan/authors/id/U/UL/ULPFR/"
  381. "Text-German-" version ".tar.gz"))
  382. (sha256
  383. (base32
  384. "1p87pgap99lw0nv62i3ghvsi7yg90lhn8vsa3yqp75rd04clybcj"))))
  385. (build-system perl-build-system)
  386. (home-page "https://metacpan.org/release/Text-German")
  387. (synopsis "German grundform reduction")
  388. (description "This module is a rather incomplete implementation of work
  389. done by Gudrun Putze-Meier.")
  390. (license perl-license)))