25 October 2010

Teaching Your Computer to Write Your Sacrament Meeting Talks


(This post is inspired by a great post by Orson Scott Card regarding lousy sacrament meeting talks. (Which post, incidentally, was very hard to find since the search box on mormontimes.com is broken.))

So, I'm not sure about you, but it seems to me that there are a number of "musts" when it comes to giving a sacrament meeting talk, at least in Utah. When following these "musts" you can easily take up 5 minutes of your 15-minute talk without actually talking about the topic.

The three lousy talk musts



First, you must tell some story about how you received the assignment to give the talk. This will take up a minimum of 30 seconds (e.g. I was just mowing my lawn on Wednesday when I got a call from Brother So-and-so to give a talk this Sunday) and could very well take up your whole 5-minute pre-talk.

Second, you must tell a joke. It would be better to make sure that the joke has nothing to do with the topic since that might end your pre-talk earlier than you intended. Again, there is great flexibility here and, if you don't have a good how-I-received-the-assignment story, a great joke could easily take 5 minutes.

Third, you must mention what Webster's Dictionary has to say about the word. It might be hard to make the pre-talk part of this extend 5 minutes, so you will definitely want to focus on the first two.

(To read more on the above, do check out Card's article with the link at the top.)

After you include a few general authority quotes and scriptures, you're done!

So easy, my computer can do it



To demonstrate the facility of accomplishing these three items, I have harnessed the computing power of natural language generation and recursive transition networks (that's not a mouthful at all) to generate sacrament talks for me. Here is an example of a talk that it created for me in about 500 milliseconds:


I was just washing my dog last Thursday when Brother Wu invited me to give a
talk on repentance in sacrament meeting this Sunday. (turn to bishopric)
Thanks, Brother Wu! Thank you for bearing with me as I try to express you my
findings on the topic.

I want you all to raise up your left hand. Now lower it. Now you can all say
that you've been uplifted by my talk today. I heard that in a sacrament meeting
in Monticello and got a kick out of it, so thanks for letting me share that
with you.

I decided to look up repentance in the dictionary. One definition that caught
me off guard reminded me of something J. Golden Kimball clarified to us in the
April 1946 session of General Conference: "If you will remember to repent in
your every thought, you will you will increase in truth and light."

Mosiah 3:4 admonishes us that to repent, we must also have charity. I like how
J. Remington Cummings expressed to us in the October 1946 session of General
Conference: "repent and have charity. One cannot be enjoyed without the other."

May we all try today to repent. I know that the Church is true. I know that the
Book of Mormon is written for our day. In the name of Jesus Christ, Amen.


Not bad, eh?

(Warning: The techie part of the article is now beginning.)

RTN and NLG: Are those two new Church abbreviations?



A recursive transition network is a way to describe a specific language domain via a template. (There is much more to doing good natural language generation, but I won't talk about that here.) "Lousy sacrament talks" are just one of those language domains where the expressions used are typical enough that we can list the majority of them and create a human-sounding text that varies widely at each instantiation.

For example, take the first pre-talk point: Telling everyone how you got the topic and that you sooo didn't want to speak today. It typically involves mentioning the member of the bishopric that gave you the topic and what you were doing at the time when you got the call.

Here is what my very basic template looks like for the first sentence in my talk generator:


bishop: "I was just " doing-something " last " day-of-week " when " off=local-official " " issued " me to give a talk on " top=topic " " talk-when ". " sarcasm "! Thank you for " conciliatory-attitude " as I " non-yoda " to " transmit-to " you my " mental-construct " on the " subject "." ;

Whatever is in the quotes, like "I was just ", is always printed out. Whatever isn't, like doing-something, is another part of the template that the program looks up.

Here is what doing-something looks like:


doing-something: "mowing my lawn" | "at my kid's soccer game" | "washing my dog" | "watching tv" | "surfing the net" | "reading a book" ;

So, the idea is that the program can randomly choose between any of those options.

If you put the two ideas together, you can get a very complex-looking rule like the one for the first made-up quote:


future-blessing: "be blessed" | "have " the-spirit " with you" | positive-inner-change " in truth and " desirable-characteristic | find positive-difference inner-power " in your life for " reason-for-power ;

Given enough time and rules (the existing "lousy sacrament talk" RTN took me 30 minutes to write up), one could fool most listeners.

Of course, a good sacrament meeting talk would be extremely difficult for a computer since good sacrament meeting talks typically involve the personal experiences, devotions, and reflections of the individual speaking. Precisely what makes a good sacrament meeting talk is also what would be particularly difficult for a computer: Being human. That language domain is obviously much more diverse.

So, where are recursive transition networks useful?



RTNs are used in a lot of places. The most basic is when a computer will take a set of data and give the reader/listener an English version of that data. You see examples of it when you step into an elevator and it says "Going up" or "Going down" depending on which floor button you press when you get in.

A more complicated example would be a computer reading the temperature over the next 5 days and saying "It's gonna be a hot one today at 83 degrees, but things will cool off a bit by the weekend to 69 degrees." You use an RTN to vary the "language glue" bit and make the forecast sound more realistic. For example, an RTN would teach the computer that the phrase above is just as valid as "It'll be on the hot side today as the high will approach 83, but we'll cool back down by the weekend to 69." What the computer needs is 1) to know the temperature, 2) to know the average temperature for this time of year, 3) to know that the weekend is within the 5-day period, and 4) to know common vernacular surrounding weather forecasts.

Conclusion



So, may the thought of RTNs being able to replace a significant portion of our pre-talk inspire us to simply speak more like ourselves when at the podium and less like a person trying to postpone the inevitable: Giving the rest of the talk. I know that if we do this, more hearts will be knit together and more cherrios will be better spent.
Enhanced by Zemanta