What are some of the ways to convert NLP to SQL?

后端 未结 3 520
伪装坚强ぢ
伪装坚强ぢ 2021-02-06 13:43

Recently, have started working on the idea of conversational chatbot and have been thinking of different ways to convert Natural Language query to SQL. These are some of the li

3条回答
  •  遥遥无期
    2021-02-06 14:17

    The main challenge here is to fit end-user needs. Most of the end-users are not technically skilled enough and they don't know database schema.

    All open-sourced libraries mentioned here requires to use column names inside input requests, so end-user should design request as "give me count for column_name where column_name is lower than 120". This assumption is wrong because end-users usually don't care about database structure and column names. With open-source libraries, you can create another Structure Query Language layer on top of the usual SQL.

    I would recommend having a look at NLP libraries before building your service:

    BERT ==== https://github.com/hanxiao/bert-as-service

    Sentence Transformers ==== https://github.com/UKPLab/sentence-transformers

    VaderSentiment ==== https://github.com/cjhutto/vaderSentiment

    Also, I would recommend having a look at NLP to SQL software architecture and existing commercial software for Natural Language to SQL

提交回复
热议问题