Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions contrib/wordnet/util.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
;;; download methods

(defmethod download ((what (eql :wordnet))
&key (url "http://sourceforge.net/projects/wnsql/files/wnsql-1.0.1/wordnet30-sqlite-1.0.1.zip/download")
&key (url "https://sourceforge.net/projects/wnsql/files/wnsql-1.0.1/wordnet30-sqlite-1.0.1.zip/download")
(dir "data/"))
(let* ((dir (merge-pathnames dir (asdf:system-definition-pathname 'cl-nlp)))
(archive (download-file url dir)))
(let ((dir (merge-pathnames dir (asdf:system-definition-pathname 'cl-nlp))))
(format t "Downloading Wordnet from:~A to:~A~%It may take some time...~%"
url dir)
(unwind-protect
(zip:with-zipfile (zip archive)
(zip:do-zipfile-entries (name entry zip)
(when (string= "wordnet30.sqlite" name)
(write-bin-file (merge-pathnames name dir)
(zip:zipfile-entry-contents entry)))))
(delete-file archive))))
(let ((archive (download-file url dir)))
(unwind-protect
(zip:with-zipfile (zip archive)
(zip:do-zipfile-entries (name entry zip)
(when (string= "wordnet30.sqlite" name)
(write-bin-file (merge-pathnames name dir)
(zip:zipfile-entry-contents entry)))))
(delete-file archive)))))

(defmethod download ((what (eql :wordnet-ic))
&key (url "http://nltk.org/nltk_data/packages/corpora/wordnet_ic.zip")
Expand Down Expand Up @@ -81,7 +81,7 @@
(let (,cache-key)
(loop :for ,k :in ,slots
:for ,v :in ,row :do
(when-it (find (mksym ,k) ,keys)
(when-it (find (mksym ,k :package :nlp.contrib.wordnet) ,keys)
(push (cons it ,v) ,cache-key)))
(getset# ,cache-key *cache*
(apply #'make-instance ,class
Expand Down