Article generation using pre-defined paths.
Inspired by Automated Insights, the aim of this project is to generate stories/articles based on user inputs. A suitable approach for this would ideally be to train an AI to generate stories using Natural Language Generation (NLG), but this was ahead of my skillset (and still is) at the time.
Users answer a couple of questions and an article of considerable length is generated. The article can then be downloaded as pdf or just copied from the browser. Each pre-defined path has different options at each stage leading to a tree-like algorithm. To add randomness to the result, the words used to depict different options in the result are chosen in a pseudo-random fashion.
Clearly this technique can’t scale. The only way to grow and make stories seem more real would be to add more paths and word options manually i.e. content generation. This was the plan then, but clearly can’t scale in hindsight.
Hopefully i’ll be able to revisit this later in some machine-learning capacity. If you’re reading this and have ideas on how this could work, please reach out.
- Python 2.7
- Django 1.9.2
- HTML & CSS
The scenario here is that there’s a writer/journalist that needs to write a story. The base path is the type of story. There is then a critical path after which, the user then forms the main story by answering questions allocated to that path.
The types of stories were basically gotten by going through a couple of Techcabal stories and categorising them.
Base paths are:
- Past Event
- Recent changes/developments
- Good news
- Customer Service
- Friends and family
- Job Acceptance
- Job Interview
Ideas for Improvement
- The entire structure can be changed into a tree-type thing.
- You can add paths (nodes) to the tree, and defined the content options for that node (or train an AI).
- Paths won’t be hardcoded, there would be a new data layer for storing paths.
- The most promising path for me is the email base path. The potential to give users hundreds of options for content (e.g. to send to clients) based on different scenarios is interesting.
This project was an attempt to provide something to help anyone create stories at a blistering pace. Hopefully i’ll be able to come back and make it better later.