一直使用有道词典的在线版,对其的英英释义下的WordNET感到好奇,就点进去看了一下。我原本因为是个论文检索什么的,原来是普林斯顿(princeton)大学的一些的教授搞得的一个英语词法数据库(lexical database of English),顿时觉得这玩意好NB,看了一下还有的下载,就下载了一个用用,毕竟不是什么时候都想上网查单词的。
系统配置:Ubuntu 12.04 LTS
安装前提:tcl/tk 包,gcc编译器
./configure --with-tk=/usr/lib/tk8.5/ --with-tcl=/usr/lib/tcl8.5/
(备注:
1.这里的tcl和tk的版本的号可能每个人安装的不同,我安装的8.5(2013.9),现在8.6也可以从官网http://www.tcl.tk/下载
2.--with-tk=/usr/lib/tk8.5/ --with-tcl=/usr/lib/tcl8.5/必须要有,否则就会出现 configure: WARNING: Can't find Tcl configuration 和configure: WARNING: Can't find Tk configuration。 这也是我最初安装时出现的问题。
)
输出结果:
checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for ranlib... ranlib checking for a BSD-compatible install... /usr/bin/install -c checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking malloc.h usability... yes checking malloc.h presence... yes checking for malloc.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for strchr... yes checking for strdup... yes checking for strrchr... yes checking for strstr... yes checking for strtol... yes checking for nl_langinfo and CODESET... yes checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for Tcl configuration... found /usr/lib/tcl8.5/tclConfig.sh checking for Tk configuration... configure: WARNING: Can't find Tk configuration definitions xiajian@xiajian-pc:~/software/WordNet-3.0$ ./configure --with-tk=/usr/lib/tk8.5/ --with-tcl=/usr/lib/tcl8.5/ checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for ranlib... ranlib checking for a BSD-compatible install... /usr/bin/install -c checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking malloc.h usability... yes checking malloc.h presence... yes checking for malloc.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for strchr... yes checking for strdup... yes checking for strrchr... yes checking for strstr... yes checking for strtol... yes checking for nl_langinfo and CODESET... yes checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for Tcl configuration... found /usr/lib/tcl8.5/tclConfig.sh checking for Tk configuration... found /usr/lib/tk8.5/tkConfig.sh checking for existence of /usr/lib/tcl8.5/tclConfig.sh... loading checking for existence of /usr/lib/tk8.5/tkConfig.sh... loading configure: creating ./config.status config.status: creating Makefile config.status: creating dict/Makefile config.status: creating doc/Makefile config.status: creating doc/html/Makefile config.status: creating doc/man/Makefile config.status: creating doc/pdf/Makefile config.status: creating doc/ps/Makefile config.status: creating include/Makefile config.status: creating include/tk/Makefile config.status: creating src/Makefile config.status: creating lib/Makefile config.status: creating lib/wnres/Makefile config.status: creating config.h config.status: executing depfiles commands config.status: executing default commands WordNet is now configured Installation directory: /usr/local/WordNet-3.0 To build and install WordNet: make make install To run, environment variables should be set as follows: PATH - include ${exec_prefix}/bin WNHOME - if not using default installation location, set to /usr/local/WordNet-3.0 See INSTALL file for details and additional environment variables which may need to be set on your system.(仔细看上面的最后的一段关于安装的描述,如果不想将WordNet安装在默认的目录时,需要设置WNHOME变量,如果想直接在commandline中使用需要配置PATH变量,可以考虑在当前用户的主目录下的.bashrc中进行配置)
make (编译程序)
make install (安装程序,如果是使用默认安装,需要使用sudo提升权限,不然以普通用户的权限不能向/usr/local目录中写入和复制文件的)
make uninstall(卸载程序,如果安装时使用了sudo,卸载时也要使用,原因是相同的,权限问题)
WordNet截图:
备注:
1.stackflow:http://stackoverflow.com/questions/12820609/wordnet-3-0-installation-issue-on-fedora-17?s=6d8cf725-7ae9-49d2-b93d-06436b14a7c2#new-answer
2.WordNet:http://blog.csdn.net/wen_2/article/details/13004817
3. Prolog与WordNet:http://blog.csdn.net/skiffloveblue/article/details/9359449
4.WordNet词网研究:http://blog.csdn.net/skiffloveblue/article/category/1508785