added rules, ignorePunct interface; changed the js interface to use object to config