0

I want to generate plausible (or less than plausible is okay too) nonsense text similar to the way that a markov chain approach would do, but I want the nouns and verbs of the generated text to come from a different source than the analyzed text.

So, for example, let's say that text 1 is from Little Red Riding Hood, and my list of nouns/verbs is something like the ones listed here: nouns, verbs. I'm looking for a way to swap out some/all of the nouns/verbs in text 1 with the new nouns/verbs. Then I would generate a new text from the mashup (perhaps using the markov chain approach).

I'm guessing that I need some sort of initial grammar analysis for text 1, and then perhaps do a swap with appropriately coded words of the insertion noun/verb lists?

Andy G
  • 19,232
  • 5
  • 47
  • 69
mix
  • 6,943
  • 15
  • 61
  • 90
  • making some progress on a possible solution. right now i'm looking at using the natural language toolkit (NLTK) to tokenize and tag the source text. then i'll see, once I've tagged nouns and verbs, if I can programmatically substitute my own set of nouns/verbs into the original. – mix Aug 31 '13 at 21:41

1 Answers1

0

I'm not familiar with text generation but I'd suggest a language modelling approach. You should check out the first 1-2 lectures for inspiration :)

You can try creating a language model, independent on the nouns and verbs (i.e. replacing them with _noun and _verb). Then you can try generating text from it, based on a factor of randomness since the suggested model just counts words and phrases.

I haven't tried it and I hope it works for you.

Yasen
  • 1,663
  • 10
  • 17