ASP + Dictionary
Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=17374
Printed Date: 29 March 2026 at 2:54pm Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: ASP + Dictionary
Posted By: Gullanian
Subject: ASP + Dictionary
Date Posted: 28 November 2005 at 12:42pm
|
Any easy way in ASP to select random words from a full english dictionary?
|
Replies:
Posted By: ub3rl337ch3ch
Date Posted: 28 November 2005 at 5:29pm
|
weeeell... if you have said dictionary in a database, you could make yourself a random number in the range of the no. of records in the db and select record no 'x'... there's also some stuff about random sampling in this mskb article... and they look like they might be simpler to code... not sure on speed though...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlpro04/html/sp04c1.asp - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlpro04/html/sp04c1.asp
|
Posted By: Gullanian
Date Posted: 28 November 2005 at 5:36pm
|
Anyone know how to import a dictionary into SQL server, or just access one?
|
Posted By: ub3rl337ch3ch
Date Posted: 28 November 2005 at 7:37pm
er.... depends what format you have a dictionary in... the 'simplest' way would be to sit at a keyboard with a dictionary in front of you for a while...
|
Posted By: Gullanian
Date Posted: 28 November 2005 at 8:00pm
|
Is it possible to use the MS Word one at all.
|
Posted By: theSCIENTIST
Date Posted: 29 November 2005 at 12:58am
It depends on the format of the word dictionary, but if it is pure text, then yes, you can import easily.
------------- :: http://www.mylittlehost.com/ - www.mylittlehost.com
|
Posted By: michael
Date Posted: 29 November 2005 at 3:36pm
MS Word is not pure text AFAIK, just the stuff you add yourself is though.
------------- http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker
|
Posted By: Gullanian
Date Posted: 29 November 2005 at 4:25pm
Wouldn't they of probably adopted a trie data structure for storing dictionaries?
So no one knows of an easy way to just grab random words at all?
|
Posted By: theSCIENTIST
Date Posted: 29 November 2005 at 6:40pm
There are ways to grab random words, but you need a place to grab from, one that comes to mind, is to get a nice long pure text document, just about anything to act as your words pool, then just grab words from it.
To avoid repeats, check the words you are grabbing against those already in your collection, and if it is repeated, grab again.
If you find this not possible, either because it could be slow, of because you have no access to FSO, than, auto-create a XML file with all the words from the text file, discard repeats and use the XML file as your words backend and add more to it as you need.
Hows that for an idea?
------------- :: http://www.mylittlehost.com/ - www.mylittlehost.com
|
Posted By: Gullanian
Date Posted: 29 November 2005 at 6:51pm
It's a good idea, thanks! I am looking to have access to every word in the English language though.
And I don't have Dickens on my PC 
|
Posted By: theSCIENTIST
Date Posted: 29 November 2005 at 7:08pm
Right, every single word?
That could prove to be alot, anyway, I gave it some more thought, and just like there are already available databases of about anything ready for one to import and use, so there's got to be a dict database aswell.
Check this up: http://wordlist.sourceforge.net/ - http://wordlist.sourceforge.net/
It contains a few pure text files in different formats with a collection of english words, I suspect it may not be completed, but should provide a good start for you. The unofficial release contains more words than the official, check them up.
From this text file you can create a database of words with ease.
For further word lists refer to: http://www.net-comber.com/wordurls.html - http://www.net-comber.com/wordurls.html
Let us know how it went.
------------- :: http://www.mylittlehost.com/ - www.mylittlehost.com
|
Posted By: Gullanian
Date Posted: 29 November 2005 at 7:53pm
|
Thanks for that. I'm just going to be using it to run some SEO tests.
|
|