Learning effective grammar rules for machine translation