Patterns in text: Corpus-driven methods and applications