Learning language in logic