AskNow: A Framework for Natural Language Query Formalization in SPARQL

Mohnish Dubey, Sourish Dasgupta, Ankit Sharma, Konrad Höffner, Jens Lehmann

Abstract

AskNow is a framework designed to bridge the gap between natural language and structured RDF knowledge bases like DBpedia. By utilizing an intermediate Normalized Query Structure (NQS), the system achieves high syntactic robustness and paraphrase resilience, translating English questions into precise SPARQL queries. Evaluation on benchmark datasets shows that AskNow achieves an F1-score of 98.99% in syntactic accuracy and maintains high precision across varied linguistic phrasings.

Introduction

The proliferation of massive, open-access knowledge bases such as DBpedia, YAGO, and Freebase has made vast amounts of structured data available. However, accessing this data typically requires proficiency in SPARQL, a complex formal query language that remains a significant barrier for non-expert users. Natural Language Query Formalization (NLQF) aims to lower this barrier, but it faces two primary challenges: linguistic complexity (the same question can be phrased in many ways) and schema mismatch (the difference between natural language expressions and database structures).

The AskNow Framework

The core innovation of AskNow is the Normalized Query Structure (NQS). Rather than attempting a direct translation from English to SPARQL, the system employs a modular pipeline to normalize the input before formalization.

The AskNow system architecture, illustrating the pipeline from natural language input to SPARQL generation.

The pipeline consists of three main stages:

  1. NQS Instance Generation: The system uses Part-of-Speech (POS) tagging to segment the natural language query into functional "chunks." These chunks are then fitted into a canonical template: [Wh] [R1] [D] [R2] [I], where [Wh] is the query token, [D] is the "Query Desire" (the expected output), [I] is the "Query Input" (the known entity), and [R1/R2] are the connecting relations.
  2. Entity and Relation Mapping: The system identifies database entities using DBpedia Spotlight. To map natural language relations to RDF properties, it leverages WordNet for lexical synonyms and the BOA (Bootstrapping Linked Data) library for pattern matching.
  3. SPARQL Generation: Based on the identified query type (e.g., Boolean, Count, Ranking), the normalized structure is converted into a valid SPARQL query.

Normalized Query Structure in Practice

The NQS acts as a buffer against linguistic variation. By forcing diverse sentence structures into a single format, the system becomes "paraphrase resilient." The framework operates on the "Desire-Input" hypothesis, which posits that in most queries, the desired information follows a predictable syntactic role relative to the known input.

Examples of natural language queries mapped to their corresponding NQS values and generated SPARQL queries.

As shown in the examples above, the NQS successfully handles different query types, including list queries, property value lookups, counts, and rankings, by mapping them to a consistent internal representation before generating the final SPARQL code.

Evaluation and Results

The researchers evaluated AskNow using several prominent datasets, including Microsoft Encarta 98, OWL-S TC v4.0, and the QALD (Question Answering over Linked Data) benchmarks.

  • Syntactic Robustness: AskNow achieved an overall F1-score of 98.99% across all test datasets for correctly structuring queries into the NQS format.
  • Paraphrase Resilience: On the OWL-S TC dataset, which tests sensitivity to structural variation, the system maintained a 96.51% Variational Precision, demonstrating that it is not easily confused by different wordings of the same intent.
  • Benchmarking: In the QALD-5 competition, AskNow outperformed established systems like QAnswer and YodaQA. While it trailed the top-performing "Xser" system, AskNow required significantly less manual training data, highlighting its efficiency.

Conclusion

AskNow demonstrates that an intermediate normalization layer can significantly improve the robustness of natural language interfaces for RDF data. While the system currently depends on the accuracy of underlying POS taggers and faces challenges with highly complex semantic relations, its high syntactic accuracy provides a strong foundation for future work in automated entity mapping and more sophisticated relation discovery.

Summary updated

BibTeX
@inproceedings{dubey2016asknow,
  author = {Mohnish Dubey and Sourish Dasgupta and Ankit Sharma and Konrad Höffner and Jens Lehmann},
  title = {{AskNow: A Framework for Natural Language Query Formalization in SPARQL}},
  booktitle = {Eswc},
  year = {2016},
  doi = {10.1007/978-3-319-34129-3\_19},
}
Figure