Archive for July 16th, 2009


[翻译]通过Unix命令行成为一个优秀的写作者

July 16th, 2009 — 10:31am

Become a Better Writer from Unix Command Line
原文链接

在本文中我们介绍如何利用Unix/Linux命令行来纠正单词的拼写,确认单词的解释,确认单词的反义词。

1.根据开始的某几个字符串查找单词
命令 look

$ look typogr
typograph
typographer
typographers
typographia
typographic
typographical
typographically
typographies
typographist
typography

输入“typogr”,会显示以这些字符开头的单词

译注:首次使用可能需要安装字典,Ubuntu用户可以通过新德利安装wamerican, wbritish

2.查找单词的正确解释
命令 mean

利用mean命令可以显示单词的正确解释

$ mean philosophy
Overview of noun philosophy

The noun philosophy has 3 senses (first 3 from tagged texts)

1. (12) doctrine, philosophy, philosophical system, school of thought, ism — (a belief (or system of beliefs) accepted as authoritative by some group or school)
2. (8) philosophy — (the rational investigation of questions about existence and knowledge and ethics)
3. (1) philosophy — (any personal belief about how to live or how to deal with a situation; "self-indulgence was his only philosophy"; "my father’s philosophy of child-rearing was to let mother do it")

Synonyms/Hypernyms (Ordered by Estimated Frequency) of noun philosophy

3 senses of philosophy

Sense 1
doctrine, philosophy, philosophical system, school of thought, ism

=> belief

Sense 2
philosophy

=> humanistic discipline, humanities, liberal arts, arts

Sense 3
philosophy

=> belief

3.查找单词的正确解释
命令 dict

dict命令显示dict.org网站中给出单词的解释

$ dict philosophy

1. Literally, the love of, inducing the search after, wisdom;

in actual usage, the knowledge of phenomena as explained

by, and resolved into, causes and reasons, powers and

laws.

[1913 Webster]

译注:Ubuntu用户可以通过新德利安装

4.在Vi/Vim编辑器中查询单词的解释
在编辑器配置文件中添加如下快捷脚本
map <F3> :exe ":!dict ".expand("<cword>")
想要查找单词的解释只需按下F3
如果你不怎么熟悉vim中的map指令,可以阅读我们的Vim小贴示Vi/Vim Editor Macro, Mark and Map Examples.

5.查找反义词 命令 wn
命令wn可以利用参数查找不同词性的反义词

$ wn search-str -antsa

*
WordNet command
* search-str: 需要查询的单词
* -antsa: 反义词参数

(n | v | a | r) – 名词反义词 | 动词 | 形容词 | 副词

译注:Ubuntu用户可以通过新德利安装

6.如果都不行,试试谷歌
define: 单词

Comment » | 翻译

Back to top