A framework for inference in natural language front ends to databases