Text this: A behavioral approach to historical analysis