I'm looking for a piece of software, a script or whatever that could generate text based on multiple other texts.
That could be used for creating stories for instance. If the stories used as the "base" all follow the same pattern.

  • Input: Multiple text files (.txt) containing English sentences.
  • Output: A text file (.txt) same as above
  • OS: UNIX, Windows
  • Pricing: Free script, open-source if possible

The software would analyse the frequently used words, the average length, the structure, etc. I guess there are existing scripts to do this kind of thing, but maybe not all together?

For instance, mixing text A and B would give C.

A: The prince is called X. He is powerful and strong. He likes dragons and potatoes.

B: The king Y is nice. He lives in Z. He thinks he could kill the dragon.

C: The knight X' is feared. His name is X'. He kills dragons for a living.

I see how complex this is, but I've heard of a software that can summarize a text. This kind of thing is possible to do I guess. Using synonymes and stuf...
If nothing exists, I'll make it my project for this summer ^^

  • 1
    Could you please add some more details, e.g. specific requirements, and some background on how that should be used? That would significantly improve your chances to good answers. For a guide, you might refer to What is required for a question to contain "enough information"? – Izzy May 15 '14 at 9:42
  • 1
    For English language? Do you need it open source? Free? – Nicolas Raoul May 15 '14 at 11:44
  • You can generate realistic-looking nonsense in this form using N-grams, see a Ruby example here: sitepoint.com/natural-language-processing-ruby-n-grams - but if you also want such a system to track conceptual relationships and be consistent (always choosing a "knight" as the main character), then that is getting into NLP research and machine learning. It could be fun, but probably a lot of work. – Neil Slater May 15 '14 at 11:46
  • NicolasRaoul: yes. NeilSlater: Thanks! It looks interesting, I'll read this article :) I'm interested in NLP, but are there any libraries, or known-algorithms that could help me with that? – mtefi May 15 '14 at 13:13
  • @mtefi: I don't know of any, but that does not mean much. I do however suspect that there is no generic script or library for you that will get you close to your goal in one step. This is a very hard problem in NLP. You could also look at ConceptNet as a starting data source. conceptnet5.media.mit.edu – Neil Slater May 15 '14 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.