kraison / cffi-wordnet

Common Lisp interface to WordNet 3.0 using CFFI.
http://www.cliki.net/cffi-wordnet
Other
7 stars 1 forks source link

installation instructions #1

Open arademaker opened 12 years ago

arademaker commented 12 years ago

Hello,

Are you still working on this project? It is very interesting indeed! Can you provide a general instruction about the installation? I have installed wordnet 3.0 from the Princeton website using:

configure make install

The wordnet was installed in /usr/local/WordNet-3.0 (my system is a MacOS 10.7.3).

I cloned your files to ~/quicklisp/local-projects/cffi-wordnet

I suspect that I have to edit the file cffi.lisp, right? In the lines of cffi.lisp below, one thing that called my attention is that I couldn't fine the file libWN.3.dylib in my system...

;;;SWIG wrapper code ends here (define-foreign-library libwordnet (:unix (:or "/usr/lib/libwordnet.so" "/usr/lib/libwordnet-3.0.so" "/usr/local/WordNet-3.0/lib/libWN.3.dylib")) (t (:default (:or "/usr/lib/libwordnet.so" "/usr/local/WordNet-3.0/lib/libWN.3.dylib"))))

(use-foreign-library libwordnet)

(cl:defconstant DICTDIR "/usr/share/wordnet") (cl:defconstant DEFAULTPATH "/usr/share/wordnet") (cl:defconstant DATAFILE "/usr/share/wordnet/data.%s") (cl:defconstant INDEXFILE "/usr/share/wordnet/index.%s") (cl:defconstant SENSEIDXFILE "/usr/share/wordnet/index.sense") (cl:defconstant KEYIDXFILE "/usr/share/wordnet/index.key") (cl:defconstant REVKEYIDXFILE "/usr/share/wordnet/index.key.rev") (cl:defconstant VRBSENTFILE "/usr/share/wordnet/sents.vrb") (cl:defconstant VRBIDXFILE "/usr/share/wordnet/sentidx.vrb") (cl:defconstant CNTLISTFILE "/usr/share/wordnet/cntlist.rev")

Best, Alexandre

kraison commented 12 years ago

I remember it being very difficult to get a dynamic library to build on MacOS; for some reason the wordnet package does not do this by default. If you go into the lib/ directory in the Wordnet source and use my makefile, you may be able to get it to build. I will check the makefile into the repo for you shortly under contrib/macos/Makefile

kraison commented 12 years ago

OK, I just pushed the Makefile to the repo. Let me know if that builds the dylib properly for you.

arademaker commented 12 years ago

Sorry, maybe I am doing something very stupid!!

I moved your Makefile to the source structure of WordNet 3.0:

WordNet-3.0 arademaker$ ll total 920 -r--r--r--@ 1 arademaker staff 103 Nov 30 2006 AUTHORS -r--r--r--@ 1 arademaker staff 1625 Nov 14 2006 COPYING -rw-r--r--@ 1 arademaker staff 438 Dec 18 2006 ChangeLog -r--r--r--@ 1 arademaker staff 12550 Dec 18 2006 INSTALL -r--r--r--@ 1 arademaker staff 1625 Nov 14 2006 LICENSE -rw-r--r-- 1 arademaker staff 27666 May 8 17:49 Makefile -rw-r--r--@ 1 arademaker staff 114 Dec 18 2006 Makefile.am -rw-r--r--@ 1 arademaker staff 18253 Jan 20 2007 Makefile.in -rw-r--r-- 1 arademaker staff 18632 May 8 17:49 Makefile.origin -rw-r--r--@ 1 arademaker staff 0 Nov 30 2006 NEWS -r--r--r--@ 1 arademaker staff 4129 Dec 12 2006 README -rw-r--r--@ 1 arademaker staff 9509 Nov 14 2006 acinclude.m4 -rw-r--r--@ 1 arademaker staff 38522 Jan 20 2007 aclocal.m4 -rwxr-xr-x@ 1 arademaker staff 3642 Apr 29 2005 compile -rw-r--r-- 1 arademaker staff 2478 May 8 16:53 config.h -rw-r--r--@ 1 arademaker staff 2252 Jan 20 2007 config.h.in -rw-r--r-- 1 arademaker staff 21265 May 8 16:53 config.log -rwxr-xr-x 1 arademaker staff 39615 May 8 16:53 config.status -rwxr-xr-x@ 1 arademaker staff 173969 Jan 20 2007 configure -rw-r--r--@ 1 arademaker staff 1889 Jan 20 2007 configure.ac -rwxr-xr-x@ 1 arademaker staff 15205 Apr 29 2005 depcomp drwxr-xr-x@ 26 arademaker staff 884 May 8 16:53 dict drwxr-xr-x@ 10 arademaker staff 340 May 8 16:53 doc drwxr-xr-x@ 9 arademaker staff 306 May 8 16:53 include -rwxr-xr-x@ 1 arademaker staff 9212 Apr 29 2005 install-sh drwxr-xr-x@ 22 arademaker staff 748 May 8 16:53 lib -rwxr-xr-x@ 1 arademaker staff 10678 Apr 29 2005 missing drwxr-xr-x@ 15 arademaker staff 510 May 8 16:53 src -rw-r--r-- 1 arademaker staff 23 May 8 16:53 stamp-h1

After that, I executed:

$ make Makefile:249: .deps/libWN_a-binsrch.Po: No such file or directory Makefile:250: .deps/libWN_a-morph.Po: No such file or directory Makefile:251: .deps/libWN_a-search.Po: No such file or directory Makefile:252: .deps/libWN_a-wnglobal.Po: No such file or directory Makefile:253: .deps/libWN_a-wnhelp.Po: No such file or directory Makefile:254: .deps/libWN_a-wnrtl.Po: No such file or directory Makefile:255: .deps/libWN_a-wnutil.Po: No such file or directory make: *\ No rule to make target `.deps/libWN_a-wnutil.Po'. Stop.

Looks like the deps directory is not here!

kraison commented 12 years ago

Here are some better instructions: http://carruzzo.blogspot.com/2011/04/go-wordnet-on-os-x.html

arademaker commented 12 years ago

Thank you.