maxidict mac词典怎么添加词库典

页面导航:
→ 正文内容 Python中的update()方法
在Python中操作字典之update()方法的使用
这篇文章主要介绍了在Python中操作字典之update()方法的使用,是Python入门学习中的基础知识,需要的朋友可以参考下
&update()方法添加键 - 值对到字典dict2。此函数不返回任何值。
以下是update()方法的语法:
dict.update(dict2)
&&& dict2 -- 这是被添加dict到的词典
此方法不返回任何值
下面的例子显示了update()方法的使用
#!/usr/bin/python
dict = {'Name': 'Zara', 'Age': 7}
dict2 = {'Sex': 'female' }
dict.update(dict2)
print "Value : %s" % dict
当我们运行上面的程序,它会产生以下结果:
Value : {'Age': 7, 'Name': 'Zara', 'Sex': 'female'}
您可能感兴趣的文章:
上一篇:下一篇:
最 近 更 新
热 点 排 行
12345678910服务器提了一个问题,我们正在紧张地撰写答案...Mac的Dictionary很好用,英文系统自带了Oxford的英英词典。我猜想法文系统应该也会自带个英法或者法英词典什么的,德文同理。请问我可以给Dictionary添加这些词典吗?怎么添加?有Apple买好的原装词典可以免费下载吗?或者其他来源?我想添加法英和徳英。
可以的。把字典文件拷贝到/Library/Dictionaries就可以了。参考网址:下面这个网址提供世界各种语言的词库,亲测荷兰语-英语好用,虽然词条不全。
mac的Dictionary可以添加很多词库, 很多不支持的词库都可以转换成支持的词库, 例如StarDict的词库,GoldenDict的词库. 下面贴出的是前几天找到的一个词库转换方法. 几乎可以将目前常见的词库转成Mac的Dictionary&blockquote&&p&convet DSL or BGL format or starDict dictionarys to mac dictionary &br&someone makes a script to convert, it's name is pyglossary. This project is located here: &a href=&/ilius/pyglossary& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&ilius/pyglossary · GitHub&i class=&icon-external&&&/i&&/a&&br&In order to use it, you need to install Command Line Tools for Xcode and Dictionary Development Kit, the kit can be download from&a href=&/downloads& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Sign in with your Apple ID&i class=&icon-external&&&/i&&/a&&/p&&p&NB.Dictionay Development Kit is part of Auxiliary Tools for Xcode. &br&And finally here is a bash script that automates the entire process for the DSL format: Run the bash script without arguments to see usage notes. &/p&&p&NB. You will need to edit the script and set the correct value of PYGLOSSARY_HOME, by default it is ~/projects/pyglossary/pyglossary. It will auto convert and copy the finally dictionarys to Apple Dictionary location. &br&&/p&&p&[ convert_dsl_to_appledict.sh](&a href=&/elFua/8540294& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Convert dictionaries in Lingvo DSL format to AppleDict format. Depends on pyglossary, iconv, and OSX Command Line Tools for Xcode, and OSX Dictionary Development Kit&i class=&icon-external&&&/i&&/a&)&/p&&p&[ convert_bgl_to_appledict.sh](&a href=&/elFua/8541228& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&convert_bgl_to_appledict.sh&i class=&icon-external&&&/i&&/a&)&/p&&p&Note &br&&/p&&p&If you want to convert dsl.dz format dictionary of goldendict.First you need install dictzip in order to extract it to .dsl format. The dictzip cmd has built in Ubuntu.&/p&&/blockquote&我将GoldenDict下朗文5和朗文5的1.5GB的含发音的扩展词库转换成Mac的Dictionary词库了, 下载链接: &a href=&/s/1bnivEGJ& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Longman5_Extras.tar.gz等&i class=&icon-external&&&/i&&/a& (/s/1bnivEGJ). 由于Mac的词典不支持发音,所以转换之后丢失了朗文中的真人单词发音和例句发音.&br&下面是2张朗文5的靓照:&br&&img src=&/18f7a3d7cdb_b.jpg& data-rawwidth=&834& data-rawheight=&680& class=&origin_image zh-lightbox-thumb& width=&834& data-original=&/18f7a3d7cdb_r.jpg&&&br&&img src=&/0c8edd79c05fde43a4bd_b.jpg& data-rawwidth=&920& data-rawheight=&764& class=&origin_image zh-lightbox-thumb& width=&920& data-original=&/0c8edd79c05fde43a4bd_r.jpg&&-------------------------------------------------------------------------------------------------&br&update:&br&今天转换了柯林斯英英词典, 老规矩先上靓照&br&&img src=&/53eb5a731efed3fef3859_b.jpg& data-rawwidth=&2094& data-rawheight=&1300& class=&origin_image zh-lightbox-thumb& width=&2094& data-original=&/53eb5a731efed3fef3859_r.jpg&&&br&下载链接: &a href=&/s/1dDpiN4X& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&百度云 请输入提取密码&i class=&icon-external&&&/i&&/a& 密码: shcd
mac的Dictionary可以添加很多词库, 很多不支持的词库都可以转换成支持的词库, 例如StarDict的词库,GoldenDict的词库. 下面贴出的是前几天找到的一个词库转换方法. 几乎可以将目前常见的词库转成Mac的Dictionaryconvet DSL or BGL format or starDict dictio…
&img src=&/ad3bdcdb9ac7dcef23ded9_b.jpg& data-rawwidth=&430& data-rawheight=&238& class=&origin_image zh-lightbox-thumb& width=&430& data-original=&/ad3bdcdb9ac7dcef23ded9_r.jpg&&&img src=&/c45d319f0c8d63f8ea77ad5e_b.jpg& data-rawwidth=&1038& data-rawheight=&1134& class=&origin_image zh-lightbox-thumb& width=&1038& data-original=&/c45d319f0c8d63f8ea77ad5e_r.jpg&&&br&&a href=&/2009/06/use-the-mac-osx-built-in-japanese-dictionary/& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Use the Mac OSX built-in Japanese Dictionary!&i class=&icon-external&&&/i&&/a&这个链接里面说了10.5以后自带了日语词典,其他的词典我不知道是什么时候加入的。不用网上去找各种词典文件什么的,自带的已经很全了。
这个链接里面说了10.5以后自带了日语词典,其他的词典我不知道是什么时候加入的。不用网上去找各种词典文件什么的,自带的已经很全了。
微电子专业可以给Mac的Dictionary添加其他原装词典吗?怎么添加?
Mac的Dictionary很好用,英文系统自带了Oxford的英英词典。我猜想法文系统应该也会自带个英法或者法英词典什么的,德文同理。请问我可以给Dictionary添加这些词典吗?怎么添加?有Apple买好的原装词典可以免费下载吗?或者其他来源?我想添加法英和徳英。
按投票排序
mac的Dictionary可以添加很多词库, 很多不支持的词库都可以转换成支持的词库, 例如StarDict的词库,GoldenDict的词库. 下面贴出的是前几天找到的一个词库转换方法. 几乎可以将目前常见的词库转成Mac的Dictionaryconvet DSL or BGL format or starDict dictionarys to mac dictionary someone makes a script to convert, it's name is pyglossary. This project is located here: In order to use it, you need to install Command Line Tools for Xcode and Dictionary Development Kit, the kit can be download fromNB.Dictionay Development Kit is part of Auxiliary Tools for Xcode. And finally here is a bash script that automates the entire process for the DSL format: Run the bash script without arguments to see usage notes. NB. You will need to edit the script and set the correct value of PYGLOSSARY_HOME, by default it is ~/projects/pyglossary/pyglossary. It will auto convert and copy the finally dictionarys to Apple Dictionary location. [ convert_dsl_to_appledict.sh]()[ convert_bgl_to_appledict.sh]()Note If you want to convert dsl.dz format dictionary of goldendict.First you need install dictzip in order to extract it to .dsl format. The dictzip cmd has built in Ubuntu.我将GoldenDict下朗文5和朗文5的1.5GB的含发音的扩展词库转换成Mac的Dictionary词库了, 下载链接:
(/s/1bnivEGJ). 由于Mac的词典不支持发音,所以转换之后丢失了朗文中的真人单词发音和例句发音.下面是2张朗文5的靓照:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------update:今天转换了柯林斯英英词典, 老规矩先上靓照下载链接:
密码: shcd
可以的。把字典文件拷贝到/Library/Dictionaries就可以了。参考网址:下面这个网址提供世界各种语言的词库,亲测荷兰语-英语好用,虽然词条不全。
这个链接里面说了10.5以后自带了日语词典,其他的词典我不知道是什么时候加入的。不用网上去找各种词典文件什么的,自带的已经很全了。
的答案專門擷了Yosemite系統的圖:
把格式好的字典直接放到/Users/UserName/Library/Ditionaries 这里有一些词典下载
Step by Step guide on how to convert Mdic to Mac dictionary转换Mdic到Mac扩展词典教程来自 项目环境要求Python 2.7OSX10.8及以上自带Python若系统在OSX10.8以下请手动安装:Command Line Tools for Xcode可下载(注意版本号)Dictionary Development Kit从下载 Auxillary Tools for Xcode把其中的Dictionary Development Kit复制到/Developer/Extras/Dictionary Development Kit(若没有该路径请新建文件夹)BeautifulSoup4打开Terminal输入sudo easy_install beautifulsoup4 html5lib
具体步骤下载解压并记下pyglossary.pyw这个文件的路径,例如~/Software/pyglossary/pyglossary.pyw记下Mdic路径,例如~/Downloads/oald8/oald8.mdx在Terminal运行以下代码:cd ~/Downloads/oald8/
python ~/Software/pyglossary/pyglossary.pyw --read-options=resPath=OtherResources --write-format=AppleDict oald8.mdx oald8.xml
sed -i "" 's:src="/:src=":g' oald8.xml
make install
注意替换路径和文件名(oald8)体积大的词典转换时间会比较长,请耐心等待命令运行完毕。然后打开词典的设置页,勾选刚刚转换完的词典即可。最后上图Macmillan English Dictionary:汉典:
/bin/sh: /Developer/Extras/Dictionary Development Kit/bin/build_dict.sh: No such file or directorymake: *** [all] Error 127我按照stein的方法做呢,所有正常,但是到sed -i "" 's:src="/:src=":g' oald8.xml这一个步骤的时候。出现以上错误。看起来像是Auxiliy解压到系统developer文件夹的时候出错,能帮我看看具体是哪里出错了吗?这个问题如何解决呢?感谢了,就差这一步了
关键是dictionary development kit在苹果得官方网站上下不到了

我要回帖

更多关于 有道词典怎么添加词典 的文章

 

随机推荐