Re: grabbing random words

2006-09-24 Thread MonkeeSage
Steven D'Aprano wrote: > That isn't 5.75e30 words, it is the number of possible haikus. There > aren't that many words in all human languages combined. Doh! This is why _I'm_ not a computer scientist. I'm kinda slow. ;) > (Note however that there are languages like Finnish which allow you to > st

Re: grabbing random words

2006-09-23 Thread Nick Vatamaniuc
Jay, Your problem is specific to a particular internet dictionary provider. UNLESS 1) The dictionary page has some specific link that gets you a random word, OR 2) after you click through a couple of word definitions you find in the URLs of the pages that the words are indexed usin

Re: grabbing random words

2006-09-23 Thread Frode
Jay wrote: > How would I be able to grab random words from an internet source. I'd > like to grab a random word from a comprehensive internet dictionary. > What would be the best source and the best way to go about this? Here's a source that gives you a random word: http://www.zokutou.co.uk/rando

Re: grabbing random words

2006-09-23 Thread Steven D'Aprano
On Sat, 23 Sep 2006 04:37:31 -0700, MonkeeSage wrote: > Another approach would be to just scrape a CS's random (5.75 x 10^30) > word haiku generator. ;) That isn't 5.75e30 words, it is the number of possible haikus. There aren't that many words in all human languages combined. Standard English w

Re: grabbing random words

2006-09-23 Thread MonkeeSage
Another approach would be to just scrape a CS's random (5.75 x 10^30) word haiku generator. ;) import urllib import libxml2 import random uri = 'http://www.cs.indiana.edu/cgi-bin/haiku' sock = urllib.urlopen(uri) data = sock.read() sock.close() doc = libxml2.htmlParseDoc(data, None) words

Re: grabbing random words

2006-09-23 Thread bearophileHUGS
Jay: > How would I be able to grab random words from an internet source. I'd > like to grab a random word from a comprehensive internet dictionary. > What would be the best source and the best way to go about this? Why do you need to grab them from the net? A simpler solution seems to keep a loca

Re: grabbing random words

2006-09-23 Thread Bjoern Schliessmann
Jay wrote: > How would I be able to grab random words from an internet source. > I'd like to grab a random word from a comprehensive internet > dictionary. What would be the best source and the best way to go > about this? The *best* source would be a function of the internet dictionary that sel

grabbing random words

2006-09-22 Thread Jay
How would I be able to grab random words from an internet source. I'd like to grab a random word from a comprehensive internet dictionary. What would be the best source and the best way to go about this? Thanks. (Sorry if this sounds/is super noobish.) -- http://mail.python.org/mailman/listinfo