improved dialect detection speed

Signed-off-by: Arvind Chembarpu <achembarpu@gmail.com>
clarify comments

Signed-off-by: Arvind Chembarpu <achembarpu@gmail.com>