Tag: Stt

Posts

After a long delay I finally mustered up the courage to build the query ranking module. Some scary stuff. Here are the problems I’ve been facing whenever I start building this.

  • The ranking requires the table’s Foreign Key structure. Once the query generation is done, the recursive calls along with Javascript’s callbacks is a nightmare.
  • Callbacks are being received even after sending the output. Some relations between the tables are discovered even after ranking. This is troubling.
  • I tried to deal with promises but combined with the already scary ranking algorithm and multi-module structure this will just take more time than I have.

So I am switching to a new approach of this as suggested by a colleague.

For now, I have chosen packet for the trial server even though the cost is high. The specs are good (even for entry level containers) and I got some credits to work with initially.

Packet Server Config

So I setup the ssh keys for login and got to work.

The github repository for parsey mcparseface and syntaxnet is available here and it also lists out the steps required to setup syntaxnet and get it working. They also provide a demo shell script file which accepts the input at stdin and passes it to a python script named parser_eval. The output which is an ascii tree of the pos tagged statement is posted to stdout.

Before I start building up the server for the application, I wanted to pen down the structure for the app. The structure is represented below.

Abbreviations:

  • WSA: Web Speech API (Speech to Text)
  • NLP: Natural Language Processing Tool (Syntaxnet or Google Cloud NLP API)
  • DIS: Database Indexed Search
  • DDI: Database Dynamic Indexing
  • DES: Database Exhaustive Search
  • NES: NoSQL Database Elastic Search
  • SFT: SQL Database Full Text Search

Converting the Natural Language to Database Query project over to Javascript requires the implementation of the Web Speech API in a single Javascript file. I will discuss the steps taken for the integration in this blog post. Kinda unorthodox but here’s a reference before the content, if you want to experiment on Web Speech API using the official guide.

First we check if the API is available with the browser using the following code