An object-oriented approach to text processing