algorithmiaio / shorties

A place to submit your Algorithmia Shorties Contest submissions!
17 stars 0 forks source link

Theology Swap #4

Closed AraLawrence closed 7 years ago

AraLawrence commented 8 years ago

I just graduated from a coding bootcamp in Seattle, but before I lived here I was a theology grad student in New Jersey, and also worked with a few churches there. I've never used nlp algorithims before, and since some forms of theology can become so intricate and complex, I thought a fun use for this contest might be to write scripts that 'de-systematize' a systematic theologian. So, I took the first volume of Thomas Aquinas' Summa Theologica (which is ridiculously abstract and systematic), and wrote scripts to pull out just the questions and answers in order to generate trigrams and paragraphs from those.

Here is my code, along with the files where I dumped the questions and answers. After getting my questions/answers to split off correctly, I used Sentence Split, Generate Trigram Frequencies, and Generate Paragraphs from Trigrams on Algorithmia's site to generate a question from the question array, then an answer from the answer array. Then I added some scripts to change 'man/men' (as a 'universal') to 'humanity/people', and shifted many of the pronouns referring to God from 'He' to 'She', because it's a good thing to do, and Aquinas couldn't stop me : ) In this process it also seems that I made up two words 'humanifestation' and 'humanner', so, that's pretty fun...

This was my first real use of Python, and I had so much fun with it. I'm also pretty satisfied with the result. For example, looks like the answer to the third question needed to be preceded with a bite to eat:

Whether God Is Infinite?

I answer that, Nom.

It seems that the swapped up summa is also capable of Aquinas' level of abstraction:

For some said that it possessed some common nature, all things are distinguished from all other bodies must intervene between the distinction of these belong to God, in the order of Divine Providence, were the immediate principle of motion. For what is accidental to the various souls being distinguished accordingly as the formal distinction of things.

My favorite question:

Whether the True and False Are Contraries?

And such an elegant ending:

Therefore that thing.

Here's a link to the full text on a simple site. Thanks for this contest, it was fun and I learned a lot!

lizrush commented 8 years ago

Great concept! This looks great. Can't wait to give it a read :smile: