Here are a couple of relevant papers:
- Scaling Semantic Parsers with On-the-Fly Ontology Matching
- Ontology-Based Translation of Natural Language Queries to SPARQL
Doing this generally is hard. I suspect that most of my readers shouldn’t be diving head-first into building their own ontologies until they’ve tried simpler solutions and found them inadequate.