Live data from Hacker News

Generating random text

cs.bell-labs.com

11–20 of 29 posts

Re: Generating random text

#11
Is it possible to generate text by a sort of reverse-LDA, where you have topics (per-sentence or per-paragraph, ideally) and estimate the probability of a word to appear in a given topic?

You could then use these topics to generate more realistic-looking text as this ostensibly wouldn't have the wild jumps from one topic to another that naive Markov chains have.

Has anyone done anything like this, or should I give it a shot?

Re: Generating random text

#15
post #4

Earlier quoted context omitted.

If you have a good generator for text, you have a useful language model that can be plugged into applications such as speech recognition, OCR, predictive text entry systems and compression.

Could you somehow use it in reverse? What I mean is, is it possible to get a random text generator for a certain language and then use it to determine, whether a given text is in that language or not?

I recently did exactly this to discriminate English text from gibberish.

https://github.com/rrenaud/Gibberish-Detector

Re: Generating random text

#16
I accidentally reinvented this algorithm many years ago as a C++ project. Here is an example of passages that it created:

sections of ice fell through the. invectives in which he had been wondering how. roman scales was in readiness. occasional murmur of pain that continued to torment. desavanchers dicksen dickson dochard du chaillu duncan durand was a. waging a war of extermination against. lively about it no snap or bite. chairs cane sofas carved wood pillars rose pillars. skirting an acclivity covered with woods and dotted with trees of very deep water. scratching as though he'd tear his nails out and sharp bite out. jerked by a sudden stoppage of the sled dogs barked. mentioned a cemetery on the south the four brilliants of the sky great and. ranks plunging into the flames would extinguish them beneath their mass and the rest were seen in numerous flocks hovering about the borders of some beautiful river until it fell. fridays well i hope that we shall overcome. emphatically an' i make free the. profitable the captains of the sea and consequently the balloon remained.

You can see more info about it or download my source code at:

http://experimentgarden.blogspot.com/2009/11/software-tool-f...

Re: Generating random text

#17

Another practical example of Markov-chaining is http://www.x11r5.com/ - a robot that's various trained from IRC, Twitter and Identica content. There's even a weekly podcast generated from news headlines: http://www.x11r5.com/radio/

Also, personalized http://yes.thatcan.be/my/next/tweet/

Re: Generating random text

#18

Shameless Plug: This is very similar to what I use in http://wordum.net/ but instead of letters, I use whole words to generate the text.

That's exactly the idea that popped in my mind when I started reading the article (except I would have done it for free).

How successful is it? What are the advantages compared to eg randomtextgenerator.com?

Re: Generating random text

#20

Is it possible to generate text by a sort of reverse-LDA, where you have topics (per-sentence or per-paragraph, ideally) and estimate the probability of a word to appear in a given topic? You could then use these topics to generate more realistic-looking text as this ostensibly wouldn't have the wild jumps from one topic to another that naive Markov chains have. Has anyone done anything like this, or should I give it…

Natural language generation is an established idea, so you should definitely hit Google Scholar before trying anything.
Post reply on HN