grabbing random words

Nick Vatamaniuc vatamane at gmail.com
Sun Sep 24 01:48:14 EDT 2006


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 using integers and
there no gaps in the sequence,  OR

    3) The dictionary somehow exposes its database for all to access,

THEN you cannot really get random words from it.

If you need random words find yourself lists of such words online
(sites devoted to natural language processing or linguistics might have
them) then load them up into a list and randomly choose between the
indices of the list to get your words.

Nick V.


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?
> Thanks.
> 
> (Sorry if this sounds/is super noobish.)




More information about the Python-list mailing list