Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> 關於 Linux

Linux 離線查字典方案:本地架設 dictd 服務

編輯:關於 Linux

無網路環境下仍可查詢字典,關鍵在本機架設 dictd 伺服器並安裝離線詞庫。dictd 提供命令列客戶端 dict,支援多種語言詞庫。

安裝 dictd 與英文詞庫 (Ubuntu/Debian)

sudo apt-get install dictd
sudo apt-get install dict-gcide          # 英文字典 (GCIDE)
sudo apt-get install dict-moby-thesaurus # 同義詞詞典

搜尋可用語言套件

apt-cache search "dict package" | grep freedict
# 例:dict-freedict-eng-fra (英法)、dict-freedict-eng-deu (英德) 等

驗證服務與已載入資料庫

dict -I
# 輸出範例:
# gcide           203645  3859 kB  12 MB  38 MB
# moby-thesaurus  30263   528 kB  10 MB  28 MB

查詢單字

# 指定字典
dict -d gcide "word"

# 搜尋所有已安裝字典
dict "word"

dictd 查詢範例

優勢: 完全離線、無廣告、支援多語言、命令列介面適合腳本整合、資料庫定期更新只需 apt-get upgrade。
Copyright © Windows教程網 All Rights Reserved