Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
算法求助(设计英语词典查找程序)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jiahua Huang  
View profile   Translate to Translated (View Original)
 More options Nov 25 2007, 6:39 am
From: "Jiahua Huang" <jhuangjia...@gmail.com>
Date: Sun, 25 Nov 2007 19:39:31 +0800
Local: Sun, Nov 25 2007 6:39 am
Subject: Re: [python-chinese] 算法求助(设计英语词典查找程序)
给你这个吧,来自自由软件 xdict/pydoct 的词典

http://linuxfire.com.cn/~huahua/soft/dict/xdict-ec.db.7z

import bsddb
db = bsddb.btopen('xdict.db')

def quer(word):
    if word in db:
        return db[word]
    return ''

if __name__=="__main__":
    import sys
    try:
        print quer(sys.argv[1]).decode('utf8'),
    except:
        pass

On Nov 25, 2007 5:21 PM, york cao <york...@gmail.com> wrote:

> 要做一个小型的英文单词查找程序,群里面谁能够提供一下常用的单词表。
> 谢谢。

_______________________________________________
python-chinese
Post: send python-chin...@lists.python.cn
Subscribe: send subscribe to python-chinese-requ...@lists.python.cn
Unsubscribe: send unsubscribe to  python-chinese-requ...@lists.python.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jiahua Huang  
View profile   Translate to Translated (View Original)
 More options Nov 25 2007, 10:04 pm
From: "Jiahua Huang" <jhuangjia...@gmail.com>
Date: Mon, 26 Nov 2007 11:04:12 +0800
Local: Sun, Nov 25 2007 10:04 pm
Subject: Re: [python-chinese] 算法求助(设计英语词典查找程序)
什么啊,就是标准的 bsddb 磁盘字典,

上边不是给你贴了读取么,

import bsddb
db = bsddb.btopen('xdict.db')

words = list(db)
wordsdict = dict(db)

就是得到单词表

恩,难道你在 python 还没用过 dict ?

On Nov 25, 2007 8:11 PM, york cao <york...@gmail.com> wrote:

> 谢谢你,不过我想从原始的设计。那个数据库封装了,什么都看不见了。。

_______________________________________________
python-chinese
Post: send python-chin...@lists.python.cn
Subscribe: send subscribe to python-chinese-requ...@lists.python.cn
Unsubscribe: send unsubscribe to  python-chinese-requ...@lists.python.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "[python-chinese] 算法求助(设计英语词典查找程序)" by Albert Lee
Albert Lee  
View profile   Translate to Translated (View Original)
 More options Nov 27 2007, 8:49 pm
From: "Albert Lee" <hanzhup...@gmail.com>
Date: Wed, 28 Nov 2007 09:49:26 +0800
Local: Tues, Nov 27 2007 8:49 pm
Subject: Re: [Woodpecker-Py::1074] Re: [python-chinese] 算法求助(设计英语词典查找程序)
他是想从基本数据结构开始写

On 26/11/2007, Jiahua Huang <jhuangjia...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google