GeoQuery is a dataset used for benchmarking semantic parsers. It contains 880 queries about USA geography. The queries are in Prolog format, for example:


(this represents a question for the longest river that passes through the us).

I have read several papers about the GeoQuery, but they don't seem to give a formal definition of the grammar underlying the dataset. The email address in the dataset page seem to be dysfunctional. So, my question (addressed primarily to researchers who have worked with the GeoQuery dataset before) is twofold:

  • Is there a formal definition of the GeoQuery language?
  • Is this language context-free?


It seems that, if the number of variables (A, B, C...) is unlimited, then GeoQuery is not context-free, because a CFG cannot make sure that two variables in different places are identical (this is similar to the {ww} language, which is not context-free).

But what if we limit ourselves to A, B and C?

  • $\begingroup$ Is this question (at least the first part) not best asked directly to those that support the tool/dataset? $\endgroup$ – Raphael Apr 15 '13 at 14:20
  • $\begingroup$ I sent an email, but it bounced back. Since this dataset is used by many computer scientists, specifically in the field of semantic parsing, I was hoping someone has more information. $\endgroup$ – Erel Segal-Halevi Apr 16 '13 at 10:02
  • 1
    $\begingroup$ I think the syntax is a subset of Prolog's syntax, and the issue of an infinite collection of variables is not problematic. $\endgroup$ – Dave Clarke Apr 16 '13 at 11:58
  • $\begingroup$ the syntax looks like basically, "nested predicates" or "predicate formulas". and they've defined most of the predicates right? you might also look into "geographic sql" which is an extension of sql into geography, available on some db's. $\endgroup$ – vzn Apr 16 '13 at 15:27
  • $\begingroup$ It looks like a subset of Prolog, but is this subset context-free? $\endgroup$ – Erel Segal-Halevi Apr 17 '13 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.