-
在官网下载WordNet 3.0(Linux)tar.gz后缀
http://wordnetcode.princeton.edu/3.0/WordNet-3.0.tar.gz
-
将下载的安装包解压到某个目录
-
cd到该目录
-
使用 ./config 命令配置安装前参数
a.配置tcl
找到tclConfig.sh所在位置
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tcl.framework/Versions/8.5/tclConfig.sh
b.配置tk
找到tkConfig.sh所在位置:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/
c.组合上述两个地址到./configure并运行
$ ./configure --with-tcl=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tcl.framework/Versions/8.5/ --with-tk=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/
检查配置通过后就可以执行安装命令,出现问题配置不通过的自行搜索解决
- 执行安装命令
$ sudo ln -s /opt/X11/include/X11 /usr/local/include/X11 //连接到X11
$ make
$ make install
安装完成就就会出现在/usr/local/WordNet-3.0
6. 配置环境变量
sudo vi /etc/bash.bashrc PATH=$PATH:/usr/local/WordNet-3.0/bin
或手动添加
$ sudo open .bash_profile //打开环境变量的文件
$ source .bash_profile //保存使环境变量生效
7. 测试
$ wn
或者
$ wnb
出现
$ wn
usage: wn word [-hgla] [-n#] -searchtype [-searchtype...]
wn [-l]
-h Display help text before search output
-g Display gloss
-l Display license and copyright notice
-a Display lexicographer file information
-o Display synset offset
-s Display sense numbers in synsets
-n# Search only sense number #
searchtype is at least one of the following:
-ants{n|v|a|r} Antonyms
-hype{n|v} Hypernyms
-hypo{n|v}, -tree{n|v} Hyponyms & Hyponym Tree
-entav Verb Entailment
-syns{n|v|a|r} Synonyms (ordered by estimated frequency)
-smemn Member of Holonyms
-ssubn Substance of Holonyms
-sprtn Part of Holonyms
-membn Has Member Meronyms
-subsn Has Substance Meronyms
-partn Has Part Meronyms
-meron All Meronyms
-holon All Holonyms
-causv Cause to
-pert{a|r} Pertainyms
-attr{n|a} Attributes
-deri{n|v} Derived Forms
-domn{n|v|a|r} Domain
-domt{n|v|a|r} Domain Terms
-faml{n|v|a|r} Familiarity & Polysemy Count
-framv Verb Frames
-coor{n|v} Coordinate Terms (sisters)
-simsv Synonyms (grouped by similarity of meaning)
-hmern Hierarchical Meronyms
-hholn Hierarchical Holonyms
-grep{n|v|a|r} List of Compound Words
-over Overview of Senses
$ wnb
$ 2020-07-08 18:10:23.071 wishwn[15056:1479036] CoreText note: Client requested name ".SFNSMono-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2020-07-08 18:10:23.071 wishwn[15056:1479036] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.
2020-07-08 18:10:23.071 wishwn[15056:1479036] CoreText note: Client requested name ".SF NS Mono", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2020-07-08 18:10:23.164 wishwn[15056:1479036] CoreText note: Client requested name ".SFNSMono-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2020-07-08 18:10:23.164 wishwn[15056:1479036] CoreText note: Client requested name ".SF NS Mono", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2020-07-08 18:10:23.164 wishwn[15056:1479036] CoreText note: Client requested name ".SFNSMono-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
即为安装成功
ps.自己安装的时候网上完整的教程没找到,也是自己琢磨出来的,如果方法好用点个赞再走吧(o´ω`o)~~~
参考资料
1.Install WordNet in Mountain Lion
https://blog.csdn.net/jyfeather/article/details/8183149?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522159420228519724846400485%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=159420228519724846400485&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allfirst_rank_ecpm_v3~pc_rank_v2-5-8183149.first_rank_ecpm_v3_pc_rank_v2&utm_term=wordnet%E5%AE%89%E8%A3%85+mac
2.WordNet:
https://wordnet.princeton.edu/download/current-version