Prediction uses select column from the ground truth
farsmile opened this issue · 3 comments
Hi Wonseok:
thanks for your pretty work here and the issue is as following:
https://github.com/naver/sqlova/blob/master/train.py#L406
g_wvi_corenlp = get_g_wvi_corenlp(t)
this is using the "conds" in dev and if one want to predict from a plan sentence of english, he would not find the way to get something like "{"conds":[[0,0,"1998"]], "sel":1, "agg":0}".
the following url tells a similar problem on SQLnet
xiaojunxu/SQLNet#12
have i miss something or do you have a similar snippet of codes.
thank a lot
Hi @farsmile
To predict SQL from the plane text, you need to tokenize questions first by using StandforeCoreNLP, for example, by using following function.
Lines 18 to 34 in b7ce9ad
After that, to generate SQL, the ground truth is not required. It is used in test
function only to calculate loss and accuracies of dev set
or test set
. See below.
Lines 432 to 441 in b7ce9ad
Thanks.
Wonseok
Hi Wonseok:
it works again.
so much thanks!
您好Wonseok:
感谢您在这里的漂亮工作,问题如下:
https://github.com/naver/sqlova/blob/master/train.py#L406
g_wvi_corenlp = get_g_wvi_corenlp(t)
这是在开发中使用“conds”,如果想要的话从英语的计划句中预测,他找不到像“{”conds“:[[0,0,”1998“]],”sel“:1,”agg“:0}这样的方法。 。以下url告诉SQLnet xiaojunxu / SQLNet#12上的类似问题
have i miss something or do you have a similar snippet of codes.
非常感谢
Hi Wonseok:
thanks for your pretty work here and the issue is as following:
https://github.com/naver/sqlova/blob/master/train.py#L406
g_wvi_corenlp = get_g_wvi_corenlp(t)
this is using the "conds" in dev and if one want to predict from a plan sentence of english, he would not find the way to get something like "{"conds":[[0,0,"1998"]], "sel":1, "agg":0}".the following url tells a similar problem on SQLnet
xiaojunxu/SQLNet#12have i miss something or do you have a similar snippet of codes.
thank a lot
same question, How did you change it?