python制作词典软件_AlphaDict: 它是一个轻量级的开放词典格式的开源词典软件,你可以制作自己的词典, 也是一个跨平台的软件支持 linux, unix and windows....
關于 “阿爾法詞典”
===============
版本號: 1.4.1
作者: 李力瓊 (joni lee)
網站: prajna.top
它是一個輕量級的開放詞典格式的開源詞典軟件,你可以制作自己的詞典, 也是一個跨平臺的軟件支持 linux, unix and windows.
功能特性:
. 支持大量第三方詞典格式: cedict, startdict, dicts.info, IDP,etc.
. 屏幕取詞功能.
. 生詞本.
. 容易制作自己的詞典.
從下面的鏈接,你可以下載軟件,詞典,代碼,了解相關軟件信息。
sourceforge: "http://sourceforge.net/projects/alphadict" (軟件主頁)
github : "https://github.com/kartorz/AlphaDict" (代碼倉庫)
netdisk : "https://pan.baidu.com/s/1o7MeKQI" (下載軟件,代碼,詞典)
wiki : "https://github.com/kartorz/AlphaDict/wiki" (維基主頁)
許可證
=======
Alpha詞典在"GNU GENERAL PUBLIC LICENSE, version 3 (GPLv3)" 許可證下發布.
你可以通過 gpl-2.0.txt 文件, 或者 網頁 "http://www.gnu.org/copyleft/gpl.html" 了解相關的許可證信息。
安裝需要的開發包
==============
"Alpha詞典"依賴如下開發包:
1) QT5(gui): "http://qt-project.org/downloads"
2) boost: "http://www.boost.org/"
3) sqlite: "https://www.sqlite.org"
ubuntu14.04:
sudo apt-get install libboost1.55-dev libboost-filesystem1.55-dev qtbase5-dev
libqt5x11extras5-dev libsqlite3-dev
如何編譯
=======
linux,unix
----------
$ ./configure
$ ./configure --help
can give you some useful information, if you get trouble and want to set some
custom configurations to fix it.
$ make
$ make install
$ AlphaDict
Now, You can enjoy 'AlphaDict'.
$ make uninstall
$ make uitr
make muti-language.
windows
-------
# VS2010 #
. Install qt-opensource-windows-x86-msvc2010_opengl-5.3.0.exe
. Install boost_1_55, compile it follow the instructions.
. Open the solution file: VS2010/AlphaDict/AlphaDict.sln.
. Build
如何制作詞典
==========
"Alpha詞典"有一個開發的詞典格式, "doc/(dictionary_inner.pdf,front-end_format.xml)" 是詞典格式文檔。
鼓勵用戶制作自己的詞典.
通常情況下,你只需要了解 'front-end_format.xml', 能制作詞典只需要2個步驟.
1) 根據 front-end_format.xml的格式, 創建一個 xx.xml 文件.
2) 使用 AlConvert(.exe) 轉換 xx.xml, 生成 xx.aldict 文件。
$ AlConvert -o xx xx.xml
將生成詞典文件: xx.aldict.
AlConvert 支持多xml文件.你可以把一個大的xml,分割成多個小的xml文件,或者把幾個xml文件,合并生成一個詞典文件。
$ AlConvert -o xx xx.xml xx_2.xml xx_3.xml
doc/alphadict_en-ch.xml 是一個例子, 你可以參考它來制作自己的詞典.
詞典路徑
=======
windows : '安裝路徑'/system/dicts
linux, unix: /usr/local/share/alphadict/dicts
如何使用第三方詞典
===============
對一些詞典格式,"Alpha詞典"不提供直接的支持,需要使用工具進行轉換, 轉換為 "Alpha詞典"的前端xml格式。
可能大家覺得有點麻煩, 這些工具全部是 python 腳本,使用起來非常簡單,也便于修改。它們的位置在:
/usr/local/share/alphadict/tools -- linux, unix
'安裝目錄'/sytem/tools -- win32.
我會預先制作一下詞典, 最好的辦法還是自己去轉換,因為一些詞典會自動更新。
$ python xx_toaldictxml.py
將顯示該工具的用法.
星際譯王 (stardict)
------------------
1) 把所有的詞典文件放到一個目錄下, 如 foo.
foo/ [foo_xx.idx, foo_xx.ifo, foo_xx.dict]
2) $ python stardict_to_aldictxml.py -i foo/foo_xx -o foo_xx.xml
3) $ AlConvert -o foo_xx foo_xx.xml
生成詞典文件 foo_xx.aldict
你能從下面鏈接,下載星際譯王的詞典:
"http://abloz.com/huzheng/stardict-dic"
cedict
------
當前只支持文本格式,請下載 text 文件, 而不是 'xml' 文件.
$ python cedict_to_aldictxml.py -i foo.txt
$ AlConvert -o foo foo.xml
生成詞典文件 foo_xx.aldict
你能從下面鏈接,下載 cedict 的詞典:
"http://www.mdbg.net/chindict/chindict.php?page=cedict"
dicts.info
----------
你能從下面鏈接,下載雙語詞典:
"http://www.dicts.info/uddl.php"
選擇 "File format: UTF-8 plain text", 然后 "Download dictionary".
下面是一個轉換詞典的例子.
$ ./dictsinfo_to_aldictxml.py -i english-chinese-xx.txt
$ AlConvert -o dictsinfo_english-chinese english-chinese-xx.xml
IDP
---
你能從下面鏈接,下載詞典文件:
"http://www.june29.com/IDP/IDPfiles.html"
查找 "Dictionary Files"
下面是一個轉換詞典的例子.
$ ./idp_to_aldictxml.py -i French.txt
$ AlConvert -o idp_french French.xml
如何提交Bug, 貢獻代碼, 提出意見,或者取得聯系
========================================
我的email是: joni.kartorz.lee@gmail.com.
任何同軟件相關的問題,你都可以聯系我。
總結
以上是生活随笔為你收集整理的python制作词典软件_AlphaDict: 它是一个轻量级的开放词典格式的开源词典软件,你可以制作自己的词典, 也是一个跨平台的软件支持 linux, unix and windows....的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: IDEA maven 项目打包:Coul
- 下一篇: 【正点原子MP157连载】 第六章 TF