How to retrieve and classify text from various sources