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

Standardize qa pairs #131

Closed richagadgil closed 4 years ago

richagadgil commented 4 years ago

What's New?

Eliminate redundant CSV copies, move questions to database and use API to pull latest answerable questions from db

Fixes #<> ... (e.g. #9)

Type of change (pick-one)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration (hardware/operating system/etc). ran doctests

Checklist (check-all-before-merge)

formatting help: - [x] means "checked' and - [ ] means "unchecked"

mfekadu commented 4 years ago

Answers are ok

(api) ➜  api git:(standardize_qa_pairs) python3 nimbus.py
initialized database session
initialized NimbusMySQLAlchemy
initialized database session
initialized NimbusMySQLAlchemy
Enter a question: what is Foaad Khosmood
[nltk_data] Downloading package stopwords to
[nltk_data]     /Users/mfekadu/nltk_data...
[nltk_data]   Package stopwords is already up-to-date!
[nltk_data] Downloading package punkt to /Users/mfekadu/nltk_data...
[nltk_data]   Package punkt is already up-to-date!
[nltk_data] Downloading package averaged_perceptron_tagger to
[nltk_data]     /Users/mfekadu/nltk_data...
[nltk_data]   Package averaged_perceptron_tagger is already up-to-
[nltk_data]       date!
/Users/mfekadu/.local/share/virtualenvs/api-3RYm-VjB/lib/python3.6/site-packages/sklearn/base.py:251: UserWarning: Trying to unpickle estimator KNeighborsClassifier from version 0.21.3 when using version 0.20.2. This might lead to breaking code or invalid results. Use at your own risk.
  UserWarning)
{'entity': 'Foaad Khosmood', 'tag': 'PROF', 'normalized entity': 'Foaad Khosmood', 'input question': 'what is Foaad Khosmood', 'normalized question': 'what is [PROF]', 'question class': "What is [PROF]'s email?"}
Foaad Khosmood's email is foaad@calpoly.edu.