错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

SV2-SQL: a text-to-SQL transformation mechanism based on BERT models for slot filling, value extraction, and verification

  • Chih-Yung Chang,
  • Yuan-Lin Liang,
  • Shih-Jung Wu,
  • Diptendu Sinha Roy

摘要

Information retrieval from databases is challenging for a non-SQL-domain expert. Some previous studies have provided solutions for translating the natural language to SQL instruction, aiming to access the information in the database directly. However, most solutions are in English Natural Language. In addition, the accuracies of the existing works still need to be improved. This work presents a mechanism called SV2-SQL, based on the pre-trained BERT. The proposed SV2-SQL mainly consists of multiple deep-learning models, including select-where slot filling model (SWSF-model), value extraction model (VE-model), and verification (V-model). The SWSF-model handles the classification tasks for those fields that appear in the “Select” and “Where” clauses, and the VE-model extracts the values for the “Where” clause from the input. The V-model sorts out the unwanted candidates from two previous models and leaves only the ones with the highest possibility. The proposed SV2-SQL also includes an algorithm for the inference process and allows the three models to be cooperative. Experimental results show that the proposed SV2-SQL outperforms the existing studies in terms of precision, accuracy, and recall.