A set of js functions for analyzing the grammar of a text