Learning the Rules for Conversations