calpoly-csai / api

Official API for the NIMBUS Voice Assistant accessible via HTTP REST protocol.
https://nimbus.api.calpolycsai.com/
GNU General Public License v3.0
9 stars 4 forks source link

changing input data structure for multiple var extaction #173

Open richagadgil opened 4 years ago

richagadgil commented 4 years ago

What's New?

Adding support for multiple variable extraction.

The new JSON returned from variable_extractor/extract_variables looks like:

{ entities: List of Entities, normalized question: question with all entities extracted, input question: raw question }

entities is a list of JSONS in the following format: { entity: entity, tag: tag, normalized entity: normalized entity, normalized entity question: question normalized for ONLY this entity }

Let's take an example...

question = "When is CSC 202 taught by Workman?" { entities: [{entity: 'CSC 202', tag: 'COURSE', normalized entity: 'CSC 202', normalized entity question: 'When is [COURSE] taught by Workman?'}, {entity: 'Workman', tag: 'PROF', normalized entity: 'Workman', normalized entity question: 'When is CSC 202 taught by [PROF]?'}], normalized question: 'When is [COURSE] taught by [PROF]?', input question: 'When is CSC 202 taught by Workman?' }

Has been tested with the edge condition of NO entities found.

Works with NLP classifier code, which just looks for normalized question in the top level of the JSON structure.

Type of change (pick-one)

render[bot] commented 4 years ago

Your Render PR Server URL is https://nimbus-pr-173.onrender.com.

Follow its progress at https://dashboard.render.com/web/srv-bra2vah8vr2d92lo8e60.

sonarcloud[bot] commented 4 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

render[bot] commented 4 years ago

Your Render PR Server at https://nimbus-pr-173.onrender.com is now live!

View it on your dashboard at https://dashboard.render.com/web/srv-bra2vah8vr2d92lo8e60.

snekiam commented 4 years ago

I know this is a WIP PR and not ready to be reviewed - I noticed the server is 500'ing when asked a simple question (like 'What is Foaad's email?'). Might be worth looking into before you do too many other changes since it'll be easier to narrow down the fewer changes there are.