缘起

一直使用有道词典的在线版,对其的英英释义下的WordNET感到好奇,就点进去看了一下。我原本因为是个论文检索什么的,原来是普林斯顿(princeton)大学的一些的教授搞得的一个英语词法数据库(lexical database of English),顿时觉得这玩意好NB,看了一下还有的下载,就下载了一个用用,毕竟不是什么时候都想上网查单词的。

正文

系统配置:Ubuntu 12.04 LTS

安装前提:tcl/tk 包,gcc编译器

1.前期准备

  • gcc编译器:大多数的Linux发行版都预装的这个软件包的。如果没有装,命令:sudo apt-get install build-essential ,就会将一些基本的编译的工具安装好,包括gcc编译器和libc.so等库
  • 安装tcl/tk包,tcl/tk的网站: http://www.tcl.tk/  安装命令: sudo apt-get install tcl tcl-dev
     备注:这里假设使用的Ubuntu的dpkg安装包工具及其的包装工具(apt-XXX),其他的一些包安装工具诸如yum,rpm不太熟悉,不过命令大体相似,但是依赖项管理不如dpkg那么好用和方便。

2.正式安装

如果使用的windows系统,WordNet的下载页面http://wordnet.princeton.edu/wordnet/download/current-version/中有一个WordNet-2.1.exe下载,安装时,双击,next,next大概就可以了。
如果使用的Linux系统,那就是著名的./configure--make--make install流程了。

2.1 下载WordNet

  website:http://wordnet.princeton.edu/wordnet/download/current-version/
    
   (点击上面的tar-gzipped格式的文件或者tar-bzip文件)

2.2 解压

   使用Archieve图形界面软件解压很简单,也可以使用命令来解压
   tar -xvf WordNet-3.0.tar.gz
   cd WordNet-3.0/

2.3 正式安装

./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 commandsWordNet is now configuredInstallation directory:               /usr/local/WordNet-3.0To build and install WordNet:makemake installTo run, environment variables should be set as follows:PATH - include ${exec_prefix}/binWNHOME - if not using default installation location, set to /usr/local/WordNet-3.0See INSTALL file for details and additional environment variableswhich may need to be set on your system.

(仔细看上面的最后的一段关于安装的描述,如果不想将WordNet安装在默认的目录时,需要设置WNHOME变量,如果想直接在commandline中使用需要配置PATH变量,可以考虑在当前用户的主目录下的.bashrc中进行配置)

make (编译程序)

make install (安装程序,如果是使用默认安装,需要使用sudo提升权限,不然以普通用户的权限不能向/usr/local目录中写入和复制文件的)

make uninstall(卸载程序,如果安装时使用了sudo,卸载时也要使用,原因是相同的,权限问题)

WordNet截图:

备注:

  • 这里使用时暂时还没有给WordNet配置Path,而是直接到安装目录/usr/local/WordNet-3.0/bin中参考脚本的,这个目录下有三个脚本:
  1. wn 大概是命令行接口
  2. wnb 是上面的图形界面接口,但是在使用时候出现了个问题,./wnb: 3: ./wnb: wishwn: not found  这个问题前几天遇到过得,就是在shell脚本中调用shell脚本的问题,不知道WordNet开发者使用的什么shell解释器,在我的机器上这样是不能执行的。需要将wnb脚本中的第三行的 wishwn "$0" "$@" & 修改为$(pwd)/wishwn "$0" "$@" &。 (事后发现,在PATH中配置路径后不需要修改脚本,而使用./方式运行时需要修改)
  3. wishwn, 功能不明,不过直接执行的话出现的界面是这样的:
         
       (备注:如果你对这些脚本的功能以及tcl/tk的功能感到惊喜的话,那就去研究一下这里的shell的写法和wordnet的源代码吧。毕竟仅仅是脚本就可以做成这样,这就是Linux/Unix的魅力之一)
  • 如果对WordNet的界面感到倒胃口,觉得其几乎没有什么美学可言,一点都不优美,不如网页版的有道词典。好吧,我就是这么想的。可以考虑卸载WordNet, make uninstall. (备注:卸载的时候仅仅将文件删除了,目录没有删除,如果非常介意的话,就自己手动的目录也删了把 rm -r WordNet-3.0/)

后记

     装好了WordNet,自己又用google搜索了一下WordNet, 发现这个WordNet不简单的,并不只是一个简单的英英释义的词典,而是一个关于认知语言学的单词网络工具,有点类似于语义网络这样的东西。参考2是对WordNet的简介。由于WordNet开发过程中存在过使用prolog实现的过程,参考3中介绍的一些关于prolog与wordnet的主题。参考四中介绍了一些关于WordNet词网的研究。WordNet开发团队出版了一本关于Wordnet及其相关的理论的书《WordNet: An Electronic Lexical Database》,wordnet在线文档的地址:http://wordnet.princeton.edu/wordnet/documentation/ 牛人王垠关于WordNet一些介绍:http://docs.huihoo.com/homepage/shredderyin/wordnet.html

小结

 1. Linux下源代码安装和卸载软件的流程,tar -xvf xxx-- cd xxx -- ./configure xxxx -- make -- make install -- make uninstall
2. tcl/tk工具的界面确实不怎么的,很朴素和Java Swing有的一拼。
3. wordnet是有普林斯顿的人开发的,虽然使用是free的,但是依然是有版权的。
4. 网页的有道比金山词霸好用,原因是广告少。
6.很多问题都是可以百度google就解决了的。在现代的信息社会,搜索引擎是最好的良师益友。
5. 以上,都是废话。

参考资料

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

WordNET 安装相关推荐

  1. nltk,wordnet安装时出现问题关于omw-1.4

    把corpora里的omw文件重命名为omw-1.4(当时忘了截图了) 安装方法及链接https://blog.csdn.net/Charchunchiu/article/details/964367 ...

  2. 中文WordNet的安装与使用

    最近在中文语料上数据分析,想借用一些外部资源,就想到了WordNet,在这里记录一下,以备后用. 文章目录 (一)WordNet的介绍 (二)WordNet的安装 (三)中英文WordNet的使用 ( ...

  3. [scikit-learn 机器学习] 4. 特征提取

    文章目录 1. 从类别变量中提取特征 2. 特征标准化 3. 从文本中提取特征 3.1 词袋模型 3.2 停用词过滤 3.3 词干提取和词形还原 3.4 TF-IDF 权重扩展词包 3.5 空间有效特 ...

  4. 进行分词时,报错omw-1.4安装包未找到?

    我在进行分词时,发现报了以下错误: 我就找度娘,发现只有一位仁兄((2条消息) nltk,wordnet安装时出现问题关于omw-1.4_qq_42937719的博客-CSDN博客)提及到了这个问题, ...

  5. 金融数据挖掘 第7章 第2节(3)英文文本分析处理

    一.分割句子与单词(例1) nltk:自然语言工具包(分词.词干提取.同义词与反义词) 安装MLTK:conda install nltk (1)导入包 import nltk nltk.downlo ...

  6. 如何解决 类似 nltk安装Wordnet出错[nltk_data] Error loading wordnet: <urlopen error [Errno 111] 问题

    参考:https://blog.csdn.net/liu16659/article/details/109691534 最近想做一个NLP的数据增强,于是找到了 EDA: Easy Data Augm ...

  7. Py之nltk:nltk包的简介、安装、使用方法、代码实现之详细攻略

    Py之nltk:nltk包的简介.安装.使用方法.代码实现之详细攻略 目录 nltk包的简介 nltk包的安装 nltk包的使用方法 nltk包的代码实现 nltk包的简介 NLTK is a lea ...

  8. Ubuntu 15.04 安装 boost-python

    1. 安装依赖库 sudo apt-get install python-dev sudo apt-get install mpi-default-dev #安装mpi库 sudo apt-get i ...

  9. 安装pattern出错mysql_config not found

    Pattern是Python的一个web挖掘模块.它有工具: 1. 数据挖掘: web服务(谷歌,Twitter,维基百科),网络爬虫,HTML DOM解析器 2. 自然语言处理: 词性标记,n-gr ...

最新文章

  1. 网络工程师职业发展路线图
  2. Linux段式管理与页式管理
  3. java的外部引用_Java 调用外部程序
  4. Kali Firefox
  5. PHP实现多服务器session共享之NFS共享
  6. docker php nginx,使用docker快速搭建nginx+php环境
  7. 前端学习笔记之 创建节点 与 添加节点案例
  8. Comet杀人游戏开发日志-1(问题记录-于核心功能测试成功转向实际开发阶段)
  9. C++--第22课 - 类模板 - 下
  10. 软件系统上线前演示剧本
  11. 通过制作一个登录界面学习matlab app designer的基础使用方法
  12. Android 设置wifi共享电脑服务器资源
  13. 创业:房多多--如何成功从红海杀出一片天空
  14. 在不同linux服务器上复制anaconda的虚拟环境注意事项
  15. Mac电脑什么截图软件最好用?Snipaste for Mac实用截图教程
  16. 工厂自动化的生产线属于计算机应用,计算机试题
  17. 让自己分享的网址在QQ中更有逼格
  18. cholesky 分解加速求解线性方程组
  19. BCG界面库在VC工程中的应用步骤
  20. 世界疫情实时动态 + pyecharts可视化

热门文章

  1. 计算机视觉方向简介 | 室内场景的结构化重建
  2. R语言绘制散点图和边际图(柱形图,小提琴图)
  3. .dat文件写入byte类型数组_小师妹学JavaIO之:文件写入那些事
  4. C++:团体程序设计天梯赛(正整数A+B)
  5. day04-CentOS7下安装MySQL5.7
  6. 从运维角度看中大型网站架构的演变之路
  7. gocron mysql_gocron
  8. 使用java随机生成有个性的用户名,LOL地名+水浒传,合计2808个有意思的用户名
  9. 很简单的干电池升压IC,干电池升压芯片电路图
  10. linux U盘传输速度