A JavaScript library for text processing