dariusk / NaNoGenMo-2015

National Novel Generation Month, 2015 edition.
341 stars 21 forks source link

Generative Socratic Dialogues #132

Open yourpalal opened 8 years ago

yourpalal commented 8 years ago

Using a large corpus of academic writing on philosophy, I'm going to make a program for producing socratic dialogues. Hopefully the jargony nature of academic philosophy will make this project a bit more forgiving. Currently working with a very basic 3gram markov model, but I'm planning on introducing some kind of certainty element that will progress throughout a chapter, and conversational aspects that will hopefully look like the characters are teaching each other.

To meet the 50k word, I'm planning to have the generator make chapters on separate topics.

yourpalal commented 8 years ago

I'm currently working at generating somewhat readable phrases, and just generated the phrase "But it was eventually abandoned." Even though my computer thinks I will give up, I'm going to do my best not to.

yourpalal commented 8 years ago

I'm also hoping to have the output compiled into PDF by LaTeX, to up the academic cred of the work.

dariusk commented 8 years ago

I love the idea.

yourpalal commented 8 years ago

Progress, for anyone who's inerested: I have my corpus being split into 3 semi-detached ngram models: questions/facts/declarations, and can create a question/fact/longer rambling thing on demand. For instance, a question:

What if the opponent says “animal”, naming a genus rather than in laboratory designed experiments which place the interface between observed and observing system and locates it in denying that she is in a view coherent?"

A fact:

But this release process is called exocytosis.

A declaration:

Not only is it possible that this should occur — after all, the whole of the quantum-circuit-based computation can be be simply represented as a single unitary transformation from the debate has origins in the hypothesis h 1: balance between inhibitory and excitatory connections between function, structure, distribution and evolutionary origin.

Next up is deciding on how to structure a conversation. I'm thinking either some kind of evolving ngram model where things other people say are added in as they say them, or a reversed-order ngram model to be able to pick words and work backwards to the start of a sentence. Also I will possibly be adding some kind of templating system into this, to add better flow into conversations.

yourpalal commented 8 years ago

I'm working on the dialogue now, and generated this interesting tidbit. There's definitely a bug that was causing this, but I kind of like it!

TEACHER: The fact that they have a dorsal sigmoid bone establishes their food source is nothing like the wonder and pageantry of snarks in mating season, as they gyre and gimble on the ponds of such clocks in the animal kingdom. TEACHER: 1. STUDENT: The fact that they have a dorsal sigmoid bone establishes their descent from the slithy toves along with the other bandersnatches. STUDENT: The fact that they have evolved from the slithy toves along with the other bandersnatches. TEACHER: The fact that they have evolved from the slithy toves along with the other bandersnatches. TEACHER: Mating Display STUDENT: The fact that they have evolved from the slithy toves along with the other bandersnatches. STUDENT: The fact that they have evolved from the principal model of such clocks in the animal kingdom. TEACHER: The fact that they have evolved from the principal model of such clocks in the animal kingdom. TEACHER: The fact that they have evolved from the principal model of such clocks in the animal kingdom. STUDENT: The fact that they have evolved from the principal model of such clocks in the animal kingdom.

yourpalal commented 8 years ago

Another good snippet:

SOCRATES: You do not understand, ARISTOTLE (interrupting): Ontological holism in quantum mechanics?

ikarth commented 8 years ago

SOCRATES: You do not understand, ARISTOTLE (interrupting): Ontological holism in quantum mechanics?

This is gold.

yourpalal commented 8 years ago

Unfortunately, it's not all as good as that snippet. The quality seems to be a bit all over the place at the moment, but I'm trying to improve on that! Instead of actually typesetting it with latex, I decided to produce html, but use the standard latex font, which still looks latexy. I have put a WIP version of the document online (it's 50k words, but I'm still improving things and regenerating it).

Things left to do:

yourpalal commented 8 years ago

Alright, it's all done! For anyone who is interested, feel free to check out the generator code and a sample 50k words output.