Translating Sentences into Logical Expressions