Semantic parsing as machine translation