Fix for n-grams and speed up extraction.

- Fix so script work for general n-grams (n >= 1).
- Speed up extraction by using one big regex, formed by several sub
  regexes.
- Tried on google ngram set (1gram-"q", and 2-gram "hx").