By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,116 Members | 1,509 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,116 IT Pros & Developers. It's quick & easy.

words function

P: n/a
Hi,

I would like to have a function that will give me a random phrase based on
the letters that I have given as input. The phrase must make sense. So, I
would (initially) make sure that the last word generated would be a noun,
and all previous words would be an adjective.

eg.
$phrase = generatephrase("abc");

I would like the value of $phrase to be something like this....
"another beneficial car"
or
"absolutely bodacious cookie"

I can do this using php, but I wanted to know where I can get the
following....

A complete data set (database export or text) list of the english dictionary
with the attribute or "word type"(noun, adjective, verb, etc).

So, my question is this......

a) does this script (or service) exist publically. (this would be preferable
as I dont want to re-invent anything)?
b) where can I get a list of dictionary entries.

Thanks


Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Disco Octopus:
Hi,

I would like to have a function that will give me a random phrase based on
the letters that I have given as input. The phrase must make sense. So, I
would (initially) make sure that the last word generated would be a noun,
and all previous words would be an adjective. a) does this script (or service) exist publically. (this would be
preferable as I dont want to re-invent anything)?
I don't know about anything like that. But it wouldn't surprise me, problem
is finding it I guess.
b) where can I get a list of dictionary entries.


Ispell comes with american and british english dictionaries:
http://fmg-www.cs.ucla.edu/fmg-membe...ff/ispell.html

André Nęss
Jul 17 '05 #2

P: n/a
On Tue, 09 Dec 2003 00:25:45 +0000, André Nęss hath writ:
Disco Octopus:
b) where can I get a list of dictionary entries.


Ispell comes with american and british english dictionaries:
http://fmg-www.cs.ucla.edu/fmg-membe...ff/ispell.html


Not straightforward, tho':

|[jonz~]grep dictionary /usr/local/share/ispell/english.dict
|antidictionary
|benedictionary
|dictionary/MS
|nondictionary
|[jonz~]head /usr/local/share/ispell/english.dict
|a/RSY
|aa
|aal/A
|aalii
|aam
|Aani
|aardvark/MS
|aardwolf
|Aaron/M
|Aaronic
|[jonz~]

Jonesy
--
| Marvin L Jones | jonz | W3DHJ | OS/2
| Gunnison, Colorado | @ | Jonesy | linux __
| 7,703' -- 2,345m | config.com | DM68mn SK
Jul 17 '05 #3

P: n/a
Don't know if a script exists already or not. Shouldn't be hard to write in
any case.

There's a link to a list of ~300000 words, with their grammatical functions
denoted.

http://prdownloads.sourceforge.net/wordlist/pos-1.zip

Uzytkownik "Disco Octopus" <di****************@yahoo.com> napisal w
wiadomosci news:F_******************@news.optus.net.au...
Hi,

I would like to have a function that will give me a random phrase based on
the letters that I have given as input. The phrase must make sense. So, I
would (initially) make sure that the last word generated would be a noun,
and all previous words would be an adjective.

eg.
$phrase = generatephrase("abc");

I would like the value of $phrase to be something like this....
"another beneficial car"
or
"absolutely bodacious cookie"

I can do this using php, but I wanted to know where I can get the
following....

A complete data set (database export or text) list of the english dictionary with the attribute or "word type"(noun, adjective, verb, etc).

So, my question is this......

a) does this script (or service) exist publically. (this would be preferable as I dont want to re-invent anything)?
b) where can I get a list of dictionary entries.

Thanks

Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.