| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 |
|
| 20 | (define-module (gnu packages wordnet)
|
| 21 | #:use-module (guix build-system copy)
|
| 22 | #:use-module (guix build-system gnu)
|
| 23 | #:use-module (guix download)
|
| 24 | #:use-module (guix gexp)
|
| 25 | #:use-module (guix git-download)
|
| 26 | #:use-module (guix licenses)
|
| 27 | #:use-module (guix packages)
|
| 28 | #:use-module (gnu packages)
|
| 29 | #:use-module (gnu packages bash)
|
| 30 | #:use-module (gnu packages gcc)
|
| 31 | #:use-module (gnu packages tcl))
|
| 32 |
|
| 33 | (define-public wfrench
|
| 34 | (package
|
| 35 | (name "wfrench")
|
| 36 | (version "1.2.9")
|
| 37 | (source (origin
|
| 38 | (method git-fetch)
|
| 39 | (uri (git-reference
|
| 40 | (url "https://gitlab.com/gpernot/wfrench")
|
| 41 | (commit version)))
|
| 42 | (file-name (git-file-name name version))
|
| 43 | (sha256
|
| 44 | (base32
|
| 45 | "0vmgk303wbx67vhhcl36ycm8wlr334a1zayw8xdg0qs3nyn4qn09"))))
|
| 46 | (build-system copy-build-system)
|
| 47 | (arguments
|
| 48 | (list #:install-plan #~'(("french" "share/wfrench/french"))))
|
| 49 | (home-page "https://gitlab.com/gpernot/wfrench")
|
| 50 | (synopsis "French word list")
|
| 51 | (description "This package provides a list of French words.")
|
| 52 | (license gpl3+)))
|
| 53 |
|
| 54 | (define-public wordnet
|
| 55 | (package
|
| 56 | (name "wordnet")
|
| 57 | (version "3.0")
|
| 58 | (source (origin
|
| 59 | (method url-fetch)
|
| 60 | (uri (string-append "http://wordnetcode.princeton.edu/"
|
| 61 | version "/WordNet-" version ".tar.bz2"))
|
| 62 | (sha256
|
| 63 | (base32
|
| 64 | "08pgjvd2vvmqk3h641x63nxp7wqimb9r30889mkyfh2agc62sjbc"))
|
| 65 | (patches (search-patches
|
| 66 | "wordnet-CVE-2008-2149.patch"
|
| 67 | "wordnet-CVE-2008-3908-pt1.patch"
|
| 68 | "wordnet-CVE-2008-3908-pt2.patch"))))
|
| 69 | (build-system gnu-build-system)
|
| 70 | (arguments
|
| 71 | `(#:configure-flags (list (string-append "--with-tcl="
|
| 72 | (assoc-ref %build-inputs "tcl")
|
| 73 | "/lib")
|
| 74 | (string-append "--with-tk="
|
| 75 | (assoc-ref %build-inputs "tk")
|
| 76 | "/lib")
|
| 77 |
|
| 78 | |
| 79 | |
| 80 | "CFLAGS=-DUSE_INTERP_RESULT -O2")
|
| 81 | #:phases
|
| 82 | (modify-phases %standard-phases
|
| 83 | (add-before 'build 'build-libwn-PIC
|
| 84 | (lambda _
|
| 85 | |
| 86 | |
| 87 | (invoke "make" "-C" "lib" "CFLAGS=-O2 -g -fPIC"
|
| 88 | "LDFLAGS=-fPIC")))
|
| 89 | (add-after 'install 'post-install
|
| 90 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 91 | (let ((out (assoc-ref outputs "out"))
|
| 92 | (bin (assoc-ref outputs "tk"))
|
| 93 | (tk (assoc-ref inputs "tk"))
|
| 94 | (tkv ,(let ((v (package-version tk)))
|
| 95 | (string-take v (string-index-right v #\.)))))
|
| 96 | |
| 97 | (for-each (lambda (prog)
|
| 98 | (let ((orig (string-append out "/bin/" prog))
|
| 99 | (dst (string-append bin "/bin/" prog))
|
| 100 | (dir (string-append tk "/lib/tk" tkv)))
|
| 101 | (mkdir-p (dirname dst))
|
| 102 | (copy-file orig dst)
|
| 103 | (delete-file orig)
|
| 104 | (wrap-program dst
|
| 105 | `("TK_LIBRARY" "" = (,dir))
|
| 106 | `("PATH" ":" prefix
|
| 107 | (,(string-append out
|
| 108 | "/bin"))))))
|
| 109 | '("wishwn" "wnb"))))))))
|
| 110 | (outputs '("out"
|
| 111 | "tk")) |
| 112 |
|
| 113 | (inputs (list bash-minimal tk tcl))
|
| 114 | (home-page "https://wordnet.princeton.edu/")
|
| 115 | (synopsis "Lexical database for the English language")
|
| 116 | (description
|
| 117 | "WordNet is a large lexical database of English. Nouns, verbs,
|
| 118 | adjectives and adverbs are grouped into sets of cognitive synonyms (synsets),
|
| 119 | each expressing a distinct concept. Synsets are interlinked by means of
|
| 120 | conceptual-semantic and lexical relations. The resulting network of
|
| 121 | meaningfully related words and concepts can be navigated with the browser.
|
| 122 | WordNet is also freely and publicly available for download. WordNet's
|
| 123 | structure makes it a useful tool for computational linguistics and natural
|
| 124 | language processing.")
|
| 125 | (license x11)))
|