Linux 近反义词应用

ano*_*non 4 linux language english dictionary

有没有免费的命令行工具(最好带有数据库)来在 Linux 中查找同义词/反义词?我在哪里可以得到它?

Den*_*son 5

您可以使用Wordnet。命令行实用程序wn包括同义词库功能。

$ wn glow -n1 -synsv

Synonyms/Hypernyms (Ordered by Estimated Frequency) of verb glow

Sense 1
glow
       => radiate

$ wn slow -n2 -antsa

Antonyms of adj slow

Sense 2
slow (vs. fast)

fast (vs. slow)
        => allegro
        => allegretto
        => andantino
        => presto
        => prestissimo
        => vivace
Run Code Online (Sandbox Code Playgroud)

此页面显示了您可以使用的脚本,该脚本使用lynxdictionary.com

#!/bin/sh 
#-------- 
# Command line thesaurus 

BROWSER="/usr/bin/lynx -source" 
WEBSITE="http://thesaurus.reference.com/search?q=$1" 
HTML2TEXT="/usr/bin/html2text -style compact" 

if test $1; then 
    ${BROWSER} ${WEBSITE} | ${HTML2TEXT} | ${PAGER} 
else 
    echo "Usage: $0 word" 
    exit 1 
fi
Run Code Online (Sandbox Code Playgroud)

要使用此脚本,请将其命名为 thes,使其可执行,并确保它位于您的 $PATH 中。然后,运行脚本,后跟您感兴趣的单词。代码清单 2

$ thes word
Run Code Online (Sandbox Code Playgroud)