有没有命令行的离线词典?我知道有一些像StarDict和Artha这样的,但是有没有一个在命令行中使用的呢?
另外,我尝试了
另外,我尝试了
dict
,但它是一个在线词典。dict
,但它是一个在线词典。sdcv 是 Stardict 的控制台版本。
1. 安装字典
在终端中运行以下命令:
sudo apt-get install sdcv
3. 安装下载的词典
创建一个目录,让 sdcv
在其中寻找词典:
sudo mkdir -p /usr/share/stardict/dic/
.gz
文件还是一个 .bz2
文件。.bz2
文件:sudo tar -xvjf downloaded.tar.bz2 -C /usr/share/stardict/dic
sudo tar -xvzf downlaoded.tar.gz -C /usr/share/stardict/dic
4. 完成!
要搜索一个单词,请使用:
sdcv word
dictd
安装使用离线词典时,dict
命令非常方便。只需将dictd
守护进程及其依赖项与本地的离线词典一起安装即可。这比在本页面其他地方建议的安装sdcv
要简单得多。
下面展示了如何安装dictd
以及全面的英语词典dict-gcide
。标准软件源中还有许多其他词典可供选择。
$ sudo apt-get install dict dictd dict-gcide
$ dict word
3 definitions found
From The Collaborative International Dictionary of English v.0.48 [gcide]:
Word \Word\, n. [AS. word; akin to OFries. & OS. word, D. woord,
G. wort, Icel. or[eth], Sw. & Dan. ord, Goth. wa['u]rd,
OPruss. wirds, Lith. vardas a name, L. verbum a word; or
perhaps to Gr. "rh`twr an orator. Cf. {Verb}.]
[1913 Webster]
1. The spoken sign of a conception or an idea; an articulate
or vocal sound, or a combination of articulate and vocal
sounds, uttered by the human voice, and by custom
expressing an idea or ideas; a single component part of
human speech or language; a constituent part of a
sentence; a term; a vocable. "A glutton of words." --Piers
Plowman.
[1913 Webster]
You cram these words into mine ears, against
The stomach of my sense. --Shak.
[1913 Webster]
Amongst men who confound their ideas with words,
there must be endless disputes. --Locke.
[1913 Webster]
2. Hence, the written or printed character, or combination of
characters, expressing such a term; as, the words on a
page.
[1913 Webster]
3. pl. Talk; discourse; speech; language.
[1913 Webster]
aspell check text.txt
echo wrd | aspell -a
sudo apt-get install aspell aspell-es
(用于安装程序和西班牙语词典)。 - hoijui如果你只是想查看一个单词是否拼写正确或者存在,你可以使用 grep 来搜索 /usr/share/dict/ 目录下的单词列表文件,这些文件是由相应的 wordlist 软件包提供的。以下是一个例子,用来判断 "emu" 是否是一个有效的单词:
grep -i "^emu$" /usr/share/dict/american-english
\$
吗? - John P你可以使用免费的字典通过dict
命令:
sudo apt-get install dictd
安装。sudo apt-cache search "dict-freedict"
查找。sudo apt-get install dict-freedict-eng-tur
)。dict -D
dict "word"
dict -d fd-eng-tur "word"
要不要从网站上下载字典文本文件,例如this link(警告:4.5 MB),然后使用类似于grep "word" dictionary.txt
的命令来查找文本。
或者也可以使用VIM编辑器通过其命令/Word
搜索单词。按下n或N键可以找到单词的下一个或上一个出现位置,这样更有趣并且可以找到单词的含义。
stardict-dic-en
的东西。如果你安装了 Stardict 的图形界面版本(例如stardict
),你可能会自动获得英语词典。 - alfC