jkkummerfeld / text2sql-data

A collection of datasets that pair questions with SQL queries.
http://jkk.name/text2sql-data/
Other
547 stars 106 forks source link

Data processing question #3

Closed DeNeutoy closed 6 years ago

DeNeutoy commented 6 years ago

https://github.com/jkkummerfeld/text2sql-data/blob/master/systems/baseline-template/text2sql-template-baseline.py#L100

Is there a dataset for which it is possible to enter this elif statement? It seems that token is a str and sql_variables is a List[Dict[str, str]], (as opposed to a Dict[str, str], like sent_variables), and as such this condition is universally false.

This is mostly just a sanity check for me, as I get used to manipulating this data. Thanks!

jkkummerfeld commented 6 years ago

Thanks for noticing this! I'm currently traveling, but will follow up when I get back.

The place where this comes up is when a variable comes up in SQL, but not in the question (e.g. 'EECS' in the Advising data for some questions). This bug wouldn't change results since it would just have 'department0' instead of 'EECS' in every case. I do want to fix it though.

jkkummerfeld commented 6 years ago

Addressed by 02b8435632836d7dfce599ced77fe6aadea31fd9