Modeling Global Semantics for Question Answering over Knowledge Bases