guotong1988 / NL2SQL-RULE

Content Enhanced BERT-based Text-to-SQL Generation https://arxiv.org/abs/1910.07179
188 stars 48 forks source link

"wvi_corenlp" ? #7

Closed Bill-ai closed 4 years ago

Bill-ai commented 4 years ago

How are you getting the position of the keyword and how are you determining that the particular word is the keyword? wvi_corenlp - Please describe about this.

guotong1988 commented 4 years ago

wvi_corenlp -- where value index and corenlp lib cut the sentence.

What is keyword?

Bill-ai commented 4 years ago

{ "table_id": "1-1000181-1", "phase": 1, "question": "Tell me what the notes are for South Australia ", "question_tok": ["Tell", "me", "what", "the", "notes", "are", "for", "South", "Australia"], "sql": { "sel": 5, "conds": [ [3, 0, "SOUTH AUSTRALIA"] ], "agg": 0 }, "query": { "sel": 5, "conds": [ [3, 0, "SOUTH AUSTRALIA"] ], "agg": 0 }, "wvi_corenlp": [ [7, 8] ], "bertindex_knowledge": [0, 0, 0, 0, 4, 0, 0, 1, 3], "header_knowledge": [2, 0, 0, 2, 0, 1] }

In this how did you get "wvi_corenlp": [[7, 8]], 7th & 8th words are SOUTH AUSTRALIA? How did you extract "SOUTH AUSTRALIA"? In my terms SOUTH AUSTRALIA is the keyword here. What I know is CoreNLP takes the question and performs tokenization, what else does core NLP do?

guotong1988 commented 4 years ago

By string exact match.

Bill-ai commented 4 years ago

Are you searching the string(SOUTH AUSTRALIA) in the database and if the string is present in the database then you are returning the position in wvi_corenlp?

I thought the corenlp is extracting the word SOUTH AUSTRALIA?

What if SOUTH AUSTRALIA is not in the DB table?

guotong1988 commented 4 years ago

wvi_corenlp is the index in the question string.

Bill-ai commented 4 years ago

How does wvi_corenlp know to pick South Australia?

guotong1988 commented 4 years ago

wvi_corenlp is labeled by people.