A set of javascript functions for text mining