JavaScript library for text processing