Random Phrase Generator ?

  • Thread starter Thread starter Tom McDonald
  • Start date Start date
T

Tom McDonald

Does anyone know of a program that would generate random three-word
nonsense phrases from user-supplied lists of advectives and nouns?
 
There is an angram generator at
http://www.mbhs.edu/~bconnell/anagrams.shtml that might go some way to
doing what you want.


Tom McDonald said:
Does anyone know of a program that would generate random three-word
nonsense phrases from user-supplied lists of advectives and nouns?

Thank you, Peter ("a neophyte turk"), that page is worth a bookmark. But
I was hoping for something that would combine words, not letters,
outputting phrases like "thrilling action-packed comedy" from three word
lists that I would input. And hopefully a utility that I could download,
not an online service. There's got to be something out there...
 
_Tom McDonald_, domenica 22/ago/2004:
There is an angram generator at
http://www.mbhs.edu/~bconnell/anagrams.shtml that might go some way to
doing what you want.



Thank you, Peter ("a neophyte turk"), that page is worth a bookmark. But
I was hoping for something that would combine words, not letters,
outputting phrases like "thrilling action-packed comedy" from three word
lists that I would input. And hopefully a utility that I could download,
not an online service. There's got to be something out there...

Yes, there is, and unfortunately I deleted it from my hard drive just
yesterday (I saw that I had no use of it) and now I can't remember its name!
:(

If I manage to find it someway I'll report back.
 
Thank you, Peter ("a neophyte turk"), that page is worth a bookmark. But
I was hoping for something that would combine words, not letters,
outputting phrases like "thrilling action-packed comedy" from three word
lists that I would input. And hopefully a utility that I could download,
not an online service. There's got to be something out there...

Perhaps Rob's Amazing Poem Generator

"Once again, as an escape from productive labor, I have resorted to
programming. This one generates poetry. This poem was generated from
fortune."

http://cmdrtaco.net/poemgen.cgi

"You can snag the source code to this here."

http://cmdrtaco.net/poemgen.dlme

or Google for "Shakespearian Insult Generator" - many are on-line - the
web pages do what you want to do - one of them may have code or an app

Susan
 
Tom McDonald said:
Does anyone know of a program that would generate random three-word
nonsense phrases from user-supplied lists of advectives and nouns?

Here you go - requires ruby [http://rubyinstaller.sourceforge.net/]. You
need to call it from the command line - assuming you've saved it as
nonsense.rb, call it via

c:\> ruby nonsense.rb 5

and it'll spit out 5 nonsense phrases. If you don't supply a number, it
spits out a single phrase. It depends on your wordlists being in the
same directory, and called list1.txt, list2.txt and list3.txt.

It's a very unpolished command line app, but it should do if no one
finds anything nicer.

martin

-------------------------------------------------------------------

class Array
def rand
at(Kernel.rand(size))
end
end

lists = ['list1.txt', 'list2.txt', 'list3.txt'].map {|f|
IO.readlines(f).map! {|i| i.chomp}
}

n = (ARGV[0] || 1).to_i
n.times { puts lists.map {|i| i.rand}.join(' ') }
 
Yes, there is, and unfortunately I deleted it from my hard drive just
yesterday (I saw that I had no use of it) and now I can't remember its
name!
:(

If I manage to find it someway I'll report back.

Murphy's Law of Deleted Files applies.
 
Perhaps Rob's Amazing Poem Generator

"Once again, as an escape from productive labor, I have resorted to
programming. This one generates poetry. This poem was generated from
fortune."

http://cmdrtaco.net/poemgen.cgi

"You can snag the source code to this here."

http://cmdrtaco.net/poemgen.dlme

or Google for "Shakespearian Insult Generator" - many are on-line -
the web pages do what you want to do - one of them may have code or an
app

Susan

Zounds! This is amazing. Thanks for the lead.
 
Tom McDonald said:
Does anyone know of a program that would generate random three-word
nonsense phrases from user-supplied lists of advectives and nouns?

Here you go - requires ruby [http://rubyinstaller.sourceforge.net/]. You
need to call it from the command line - assuming you've saved it as
nonsense.rb, call it via

c:\> ruby nonsense.rb 5

and it'll spit out 5 nonsense phrases. If you don't supply a number, it
spits out a single phrase. It depends on your wordlists being in the
same directory, and called list1.txt, list2.txt and list3.txt.

It's a very unpolished command line app, but it should do if no one
finds anything nicer.

martin

-------------------------------------------------------------------

class Array
def rand
at(Kernel.rand(size))
end
end

lists = ['list1.txt', 'list2.txt', 'list3.txt'].map {|f|
IO.readlines(f).map! {|i| i.chomp}
}

n = (ARGV[0] || 1).to_i
n.times { puts lists.map {|i| i.rand}.join(' ') }

This is exactly what I'm looking for. Worked like a charm, albeit a 35
MB charm. Thank you!
 
Back
Top