
写真提供:andreasnilsson1976
この記事では、単語のスペルを修正し、単語の意味を特定し、Unix / Linux コマンド ラインから単語の反意語を特定する方法を確認します。
1.検索コマンドを使用して特定の文字列で始まる単語を検索
Unix の look コマンド を使用して、単語の正しいスペルを検索します 以下に示すように。
$ look typogr typograph typographer typographers typographia typographic typographical typographically typographies typographist typography
上記の例に示すように、引数「typogr」を指定すると、look コマンドは指定された文字列で始まるすべての単語を表示します。
注: 単語の最初の部分の正しいスペルを引数として指定する必要があります。
2.平均コマンドを使用して単語の意味を見つける
mean コマンドは、以下に示すように、特定の単語の意味を表示します。システムでこのコマンドが見つからない場合は、OS ディストリビューション リポジトリからインストールする必要があります。
$ 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 と通信して単語の意味を表示します。システムでこのコマンドが見つからない場合は、OS ディストリビューション リポジトリからインストールする必要があります。
$ 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] ...
4. Vi / Vim Editor 内の単語の意味を調べる
vim エディターから特定の単語の意味を調べるために、次のショートカットを簡単に作成できます。
map <F3> :exe ":!dict ".expand("<cword>")
特定の単語を使用していて、単語の意味を知りたい場合は、F3 キーを押して単語の意味を確認してください。
vim のマップ コマンドに慣れていない場合は、Vi / Vim エディター マクロ、マーク、マップの例について説明している Vim のヒントの記事をお読みください。
5. Wn コマンドを使用して単語の反意語を検索
以下に示すように、wn コマンドを適切なオプションとともに使用して、単語の反意語を見つけることができます。
$ wn search-str -antsa
- WordNet コマンド
- search-str:検索する文字列
- -アリ:反意語
(n | v | a | r) – 名詞の対義語 |動詞 |形容詞 |副詞
6.すべてが失敗した場合は、G に尋ねる
上記のいずれの方法でも単語の意味を調べることができない場合は、以前の Google のヒントとコツの記事で説明したように、Google 検索ボックスに次のように入力してください。
define: WORD