To Generate Random Words from Dictionary

D

Deepak

Hi,
Is there a quick way to generate random english words off the MS office
dictionary.
I am adept at C/C++ but too lazy to do my programming and look into API calls.
Was trying to find out, if Microsoft has any package that does it ( plugIN)
or is there a one shot API call, I can use (C/C++) ?

Preferrably, I would like to generate a set of about 10-15 words, that fill
in 10-15 different cells in excel, or, just have the words get printed in MS
word would also do!

Thanks,

Deepak
 
W

Word Heretic

G'day Deepak <[email protected]>,

=rand(3,5)

play with 3 and 5

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Deepak reckoned:
 
D

Deepak

Thanks! but I am aware of the rand(x,y) call. But it spews only "the lazy
fox.." always. but I need purely random words to be generated every time my
program is run. I am trying to find if there is an API call that can do
something like this:

randomGenfromDic(int numWORDS, int randSEED)
where numWORDS is the number of words to generate on random basis from the
MS dictionary ( I dont care if the dictionary is MSWORD, MSEXCEL,,etctec)
and randSEED is seed value to the random funcation generation (Optional).

Thanks,

Deepak
 
W

Word Heretic

G'day Deepak <[email protected]>,

What I did was:

make a random number from 3-11

create that many random letters
spellcheck it and accept guess
if its still a spelling error, delete retry

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Deepak reckoned:
 
D

Deepak

Wow!!
Great, Thats a cool way of doing it, couldnt think that directcion.
Great suggestion.
Now, Is there an API for spellcheck ?
Thanks,

Deepak
 
J

Jean-Guy Marcil

Deepak was telling us:
Deepak nous racontait que :
Wow!!
Great, Thats a cool way of doing it, couldnt think that directcion.
Great suggestion.
Now, Is there an API for spellcheck ?

Why an API?

Use Word's spellchecker, this is what Steve suggested.


--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
K

Klaus Linke

Jean-Guy Marcil said:
Deepak was telling us:
Deepak nous racontait que :


Why an API?

Use Word's spellchecker, this is what Steve suggested.


Yes, something like Application.CheckSpelling("transmogrifier")

You can specify the main dictionary, custom dictionaries, and whether you
want to ignore case.

Klaus
 
W

Word Heretic

G'day Deepak <[email protected]>,

You should also look up Lipsum (Lorem Ipsum), a very famous block of
black space for typesetters and designers.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Deepak reckoned:
 
H

Helmut Weber

Hi Steve,
You should also look up Lipsum (Lorem Ipsum),
a very famous block of
black space for typesetters and designers.

I personally don't like it.
I think, it is more a cheat, often used by typesetters,
for making a layout look good.

Lipsum fits well even in very small columns,
as it has very short words and an almost perfect
syllable structure, which makes end of line hyphenation too easy.

Have a nice day.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 
D

Deepak

Thanks for ALL the suggestionss!
I shall defnitely look into Ipsum as well.
To me, I dont really care if its MS Word or MS Office, or Lorem or any other
software that can generate random words. All I wanted is a program (
preferably written in C/C++) to print to a text random words that are proper
english. I think I remember SUN-JAVA was capable of doing this, but I dont
recall all too well.

But, thanks for the advise!

Good Day,
Deepak
 
J

Joe in Australia via OfficeKB.com

Generating randow words and checking them for correctness will be incredibly,
impossibly slow. There are over 100,000 combinations of four letters or fewer
and only a small fraction of these are valid words.

If you want something that looks like real text, load an existing text (e.g.,
a story) in another document and copy random sentences or paragraphs across
to your main document. If you want it to be totally random then load a
Scrabble (tm) dictionary in the other document and copy individual words
across. You can find these dictionaries and other lists of words by using
Google.

jds
 
W

Word Heretic

G'day Deepak <[email protected]>,

If you need a proper solution, tell us why you need your stated
specification.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Deepak reckoned:
 
W

Word Heretic

G'day "Joe in Australia via OfficeKB.com" <u16250@uwe>,

Dear Joe. You seemed to have missed the bit where I spell-check the
word and accept its guess. This dramatically reduces the probabilities
you discuss into the 'incredibly probable'. I leave the actual ratio
as an exercise for the anal.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Joe in Australia via OfficeKB.com reckoned:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top