Detect phrases for speed up
Merge pull request #1 from xing/phrase_speedup

Reviewed with Stephan and Leonid