Schema-Based Natural Language Semantic Mapping
- Cite this paper as:
- Stratica N., Desai B.C. (2004) Schema-Based Natural Language Semantic Mapping. In: Meziane F., Métais E. (eds) Natural Language Processing and Information Systems. NLDB 2004. Lecture Notes in Computer Science, vol 3136. Springer, Berlin, Heidelberg
This paper addresses the problem of mapping Natural Language to SQL queries. It assumes that the input is in English language and details a methodology to build a SQL query based on the input sentence, a dictionary and a set of production rules. The dictionary consists of semantic sets and index files. A semantic set is created for each table or attribute name and contains synonyms, hyponyms and hypernyms as retrieved by WordNet and complemented manually. The index files contain pointers to records in the database, ordered by value and by data type. The dictionary and the production rules form a context-free grammar for producing the SQL queries. The context ambiguities are addressed through the use of the derivationally related forms based on WordNet. Building the run time semantic sets of the input tokens helps solving the ambiguities related to the database schema. The proposed method introduces two functional entities: a pre-processor and a runtime engine. The pre-processor reads the database schema and uses WordNet to create the semantic sets and the set of production rules. It also reads the database records and creates the index files. The run time engine matches the input tokens to the dictionary and uses the rules to create the corresponding SQL query.
Unable to display preview. Download preview PDF.